**Particle Acceleration and Detection**

François Méot Haixin Huang Vadim Ptitsyn Fanglei Lin  *Editors*

# Polarized Beam Dynamics and Instrumentation in Particle Accelerators

USPAS Summer 2021 Spin Class Lectures

# **Particle Acceleration and Detection**

# **Series Editors**

Alexander Chao, SLAC, Stanford University, Menlo Park, CA, USA Katsunobu Oide, KEK, High Energy Accelerator Research Organization, Tsukuba, Japan Werner Riegler, Detector Group, CERN, Geneva, Switzerland Vladimir Shiltsev, Accelerator Physics Center, Fermi National Accelerator Lab, Batavia, IL, USA Frank Zimmermann, BE Department, ABP Group, CERN, Genèva, Switzerland

The series "Particle Acceleration and Detection" is devoted to monograph texts dealing with all aspects of particle acceleration and detection research and advanced teaching. The scope also includes topics such as beam physics and instrumentation as well as applications. Presentations should strongly emphasize the underlying physical and engineering sciences. Of particular interest are


The books forming this collection will be of importance to graduate students and active researchers alike.

François Méot • Haixin Huang • Vadim Ptitsyn • Fanglei Lin Editors

# Polarized Beam Dynamics and Instrumentation in Particle Accelerators

USPAS Summer 2021 Spin Class Lectures

*Editors* François Méot Collider-Accelerator Department Brookhaven National Laboratory Upton, NY, USA

Vadim Ptitsyn Collider-Accelerator Department Brookhaven National Laboratory Upton, NY, USA

Haixin Huang Collider-Accelerator Department Brookhaven National Laboratory Upton, NY, USA

Fanglei Lin Neutron Sciences Directorate Oak Ridge National Laboratory Oak Ridge, TN, USA

This work was supported by Brookhaven National Laboratory

ISSN 1611-1052 ISSN 2365-0877 (electronic) Particle Acceleration and Detection ISBN 978-3-031-16714-0 ISBN 978-3-031-16715-7 (eBook) https://doi.org/10.1007/978-3-031-16715-7

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023. This book is an open access publication.

**Open Access** This book is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this book are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.

The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

# **Foreword**

This is a timely, comprehensive monograph on the "production, acceleration and preservation of polarized electron and ion beams" authored by the world's leading accelerator scientists, edited and compiled by François Méot. Not only can it serve as lecture notes for graduate students, it can also be seen as a research reference book on "spin dynamics and instrumentation."

Spin is a mysterious intrinsic property of elementary particles. In 1925, G.E. Uhlenbeck and S. Goudsmit proposed a "spin-angular-momentum degree of freedom" for the electron. With it, one could magically fit the experimentally observed hydrogen spectrum via spin-orbit interaction. This proposal also magically solved many other experimentally observed puzzles: the Stern-Gerlach effect in 1922, the fine structure in atomic spectra, the allowed number of electrons in atomic structure via the Pauli exclusion principle, etc. In 1931, the spin degree of freedom of electron was found to be intrinsically embedded in Dirac equation. Nevertheless, the "intrinsic" spin-angular momentum remains a mystery.

Experiments with polarized beams provide added urgency in high-energy physics to discover new fundamental physics laws. The polarization of beam is defined as the fractional ensemble average of the quantized spin-angular-momenta of the particles along a quantization direction. If all particles in a beam are aligned with the quantization axis, the beam is fully polarized at polarization 1. If all particles are anti-aligned to the the quantization axis, it is also fully polarized but at polarization −1. However, if 50% of the particles in the beam are aligned with the quantization axis and 50% are anti-aligned with the quantization axis, it is fully depolarized at polarization 0.

The book begins with a brief review on the "past, present and future of polarized hadron beams" by Thomas Roser. This comprehensive paper provides the flow of this book by examining various polarization preservation methods of polarized beams in synchrotrons. Then, the book proceeds with two chapters on "spin dynamics in accelerators" by F. Méot. These two chapters clearly explain almost all possible depolarization mechanisms during the polarized beam acceleration in synchrotrons. The sources of beam depolarization are spin-resonances.

One method of avoiding beam depolarization is to implement local spin-rotators, or "Siberian snakes," proposed by Ya. S. Derbenev and A. M. Kondratenko in 1978. Passing through a Siberian snake produces a 180-degree precession of the polarization vector about an axis in the horizontal plane without affecting beam orbit. Vadim Ptitsyn presents the spin-rotators design concept in Chap. 4. He has designed several spin-rotators, successfully used in the Alternating Gradient Synchrotron (AGS) and Relativistic Heavy Ion Collider (RHIC) at Brookhaven National Laboratory (BNL). This chapter is a must read for people who are interested in spin manipulation system design. Then, in Chap. 5, Haixin Huang masterfully and systematically discusses the wisdom of the past 60 years regarding polarized hadron-beam acceleration in synchrotrons and storage rings.

Polarized electron beams can be achieved from the electron-beam source. Also, the beams in storage rings can reach a polarized state due to the Sokolov and Ternov effect in synchrotron radiation. Fanglei Lin provides an illuminating review of electron beam polarization in storage rings in Chap. 6. Electron beam polarization in storage rings also suffers depolarizing spin resonances, and this chapter provides a detailed exploration of the effects of various spin resonances in electron storage rings. In particular, she discusses the effect of spin resonances in the recently approved project of Electron Ion Collider (EIC) at BNL. In Chap. 7, Vadim Ptitsyn discusses the design of the "spin-matching" system in electron storage rings. Then, in Chap. 8, Yves Roblin summarizes electron-beam polarization in re-circulating linear accelerators, particularly at the Continuous-Electron-Beam-Acceleration-Facility (CEBAF). Wien filters and solenoids are used to orient beam polarization for passing through the recirculating arcs. He also mentions the polarized beam production and performance at the Stanford Linear Collider.

Numerical simulations of spin-motion in accelerators are indispensable for testing the theoretical designs mentioned in previous chapters. In Chap. 9, Vahid Ranjbar provides a comprehensive understanding of the physics, as well as various spin tracking methods in spin tracking codes. He specifically focuses on three popular codes: Zgoubi, SPINK, and gpuSpinTrack.

Beyond the spin-dynamics in accelerators, polarized beam source and polarimeters are also indispensable in physics research. In Chap. 10, Anatoli Zelenski reviews the progresses and the feasibility studies in the polarized ion sources, e.g. H<sup>+</sup> ion, D<sup>+</sup> (D−) and 3He2<sup>+</sup> ion beams of various accelerator laboratories. He also discusses various beam polarization mechanisms. The success of the RHIC polarized beam program partially owes its success to high-brilliance, highpolarization proton beam sources. In Chap. 11, Joe Grames and Matt Poelker examine the fantastic successful state-of-the-art technology of polarized-electronbeam source from GaAs photocathodes. Requirements on the drive laser system, the spin manipulation methods, and polarimetry for polarization measurements are also discussed. In Chap. 12, William Schmidke addresses the physics of ion-polarimetry and the essentials of ion-beam polarization measurements. Furthermore, he discusses the ion-polarimeters implemented at RHIC. In Chap. 13, Dave Gaskell discusses physics processes that are used in the design of electron polarimetry, i.e., Mott, Møller, and Compton polarimetry. He explores the advantages and

disadvantages of each technique, along with their challenges and requirements for achieving high precision. He focuses on the development of a conceptual design of a Compton polarimeter on the forthcoming EIC.

Finally in Chap. 14, Kiel Hock, François Méot, and Vasiliy Morozov provide the spin dynamics tutorial with numerical simulations for people who are interested in entering this field. In summary, this is a balanced and thoughtfully organized textbook, with many homework problems. It can also be seen as a learning tool and encyclopedia of "polarized beam dynamics and instrumentation in particle accelerators." This book is timely not only for the EIC project at BNL, but beyond: there are experiments such as ever-higher-precision measurement of muon g-2; the search of permanent electric dipole moment; neutron storage ring with magnetic field confinement, where an oscillating time-varying dipole field can serve as an rfbucket for neutron bunching, acceleration, etc. The interests in the spin dynamics, instead of being an esoteric subject of physics, may grow in the future.

Bloomington, IN, USA S. Y. Lee May 2022

# **Preface**

The Summer USPAS 2021 Spin Class was held from June 7 till June 18, 2021, on-line as a consequence of the covid pandemic. The class was comprised of nine lectures, four seminars, and a tutorial miniworkshop which covered the 2 weeks.

These lectures and seminars were intended as a general introduction to spin dynamics, to the transport and acceleration of polarized beams in beam lines and accelerators, and to the associated instrumentation. They provide with the necessary knowledge for further learning and for an effective involvement in existing facilities, as well as in advanced projects such as the Electron-Ion Collider (EIC), proton-EDM experiments, etc. Specialized courses regarding electric dipole moment experiments, e<sup>+</sup> − e<sup>−</sup> colliders, linacs, and other advanced topics as the "invariant spin field" are left for specialized USPAS classes, cf. for instance the recent muon g-2 class.<sup>1</sup>

Spin dynamics is the backbone of the lectures, which introduce to the theory of depolarizing resonances and the various techniques for spin manipulation and the preservation of ion and electron beam polarization during transport, acceleration, and storage. The class introduces, in addition to computation methods and tools, a tutorial based on numerical simulations. The course material provides the basic tools for the practical design of polarized beam accelerator components and optical sequences and conveys an understanding of the essential underlying theory of polarized beam dynamics and depolarizing resonances in periodic structures.

In addition to academic lectures, this USPAS Spin Class included a 2-week mini-workshop aimed at introducing the students to simulation codes and methods. Over the 2 weeks, extensive simulations of ion and electron spin dynamics, beam depolarizing effects, and polarization preservation techniques were undertaken. The exercises treated are taken from real-life polarized beam problems at the RHIC collider, Brookhaven National Laboratory; at the CEBAF polarized electron beam RLA, Thomas Jefferson Laboratory; and from the ion and electron polarized beam

<sup>1</sup> "Storage Rings for Precision Physics Applications - Muon g-2". U.S. Particle Accelerator School, Jan 2019. https://uspas.fnal.gov/programs/2019/knoxville/courses/storage-rings.shtml.

transfer lines, accelerators, and storage rings of the EIC project. This aspect of the USPAS Spin Class has been maintained in this publication, in the form of a dedicated chapter, which reflects the importance of numerical simulations in the design and the operation of polarized beam facilities.

In order to complete the scope of this general introduction to polarized beam in accelerators, the USPAS Spin Class included four seminars, resulting in as many chapters in this publication. These four chapters provide comprehensive overviews of the theory and technology of polarized ion and electron sources, and of ion and electron beam polarimetry.

The reader will find here elements of the history of the acceleration of polarized hadron and electron beams in particle accelerators; theoretical elements of spin dynamics in beam lines and depolarizing effects in circular accelerators, including spinor algebra methods; an overview of spin computer codes; an introduction to spin rotators and snakes; a review of accelerator methods to preserve polarization; theoretical elements of electron beam polarization, the effects of synchrotron radiation, polarization lifetime, and spin matching; and methods for polarization transport and preservation in a multi-GeV recirculating electron linac.

Upton, NY, USA François Méot January 2022




### Preface xi

# **Acknowledgements**

This manuscript has been authored by employees of Brookhaven Science Associates, LLC, under Contract No. DE-SC0012704 with the US Department of Energy. The publisher by accepting the manuscript for publication acknowledges that the US Government retains a non-exclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US Government purposes.

This manuscript has been authored in part by employees of UT-Battelle, LLC, under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The publisher acknowledges the US government license to provide public access under the DOE Public Access Plan (http://energy.gov/downloads/doe-publicaccess-plan).

# **Contents**



Kiel Hock, François Méot, and Vasiliy Morozov

# **Contributors**

Vincent Schoefer and Nick Tsoupas from the Brookhaven National Laboratory, and Dan Abell from Radiasoft, are acknowledged for their invaluable help, suggestions for corrections and improvements, and comments during the review process of the many chapters of these proceedings, held prior to delivery to Springer for publication.

# **Nomenclature**





# **Chapter 1 Past, Present, and Future of Polarized Hadron Beams**

1

**Thomas Roser**

**Abstract** The acceleration and storage of high energy polarized proton beams has made tremendous progress over the last 40 years challenging along the way the technologies, precision and the understanding of the beam dynamics of accelerators. This progress is most evident in that one can now contemplate high energy colliders with polarized beams and high luminosity at the same time. After a brief summary of the development and history of polarized proton beam acceleration this chapter will focus on the acceleration of polarized proton beams from MeV to the 100s of GeVs and the possibility of accelerating polarized beams to even higher energies in the future. Elements of the history of polarized electron beams, subject to the effects of synchrotron radiation, will be found in the electron beam polarization dedicated chapters in these lectures.

# **1.1 Spin Dynamics, Resonances and Siberian Snakes**

Accelerating polarized beams requires an understanding of both the orbital motion and spin motion. Whereas the effect of the spin on the orbit is negligible the effect of the orbit on the spin is usually very strong. The evolution of the spin direction of a beam of polarized protons in external magnetic fields such as exist in a circular

T. Roser (-)

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Collider Accelerator, Brookhaven National Laboratory, Upton, NY, USA e-mail: roser@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_1

accelerator is governed by the Thomas-BMT equation [1],

$$\frac{d\mathbf{P}}{dt} = -\left(\frac{e}{\gamma m}\right) \left[G\boldsymbol{\gamma}\mathbf{B}\_{\mathsf{L}} + (\mathsf{I} + G)\mathbf{B}\_{\mathsf{I}}\right] \times \mathbf{P}$$

where the polarization vector **P** is expressed in the frame that moves with the particle and the magnetic field is expressed in the laboratory frame. This simple precession equation is very similar to the Lorentz force equation, which governs the evolution of the orbital motion in an external magnetic field:

$$\frac{d\mathbf{v}}{dt} = -\left(\frac{e}{\gamma m}\right)[\mathbf{B}\bot] \times \mathbf{v}.$$

From comparing these two equations it can readily be seen that, in a pure vertical field, the spin rotates Gγ times faster than the orbital motion. Here <sup>G</sup> <sup>=</sup> <sup>1</sup>.7928 is the anomalous magnetic moment of the proton and <sup>γ</sup> <sup>=</sup> E/m. In this case the factor Gγ then gives the number of full spin precessions for every full revolution, a number that is also called the spin tune νsp. At top energies of the Brookhaven Relativistic Heavy Ion Collider (RHIC) this number reaches about 400. The Thomas-BMT equation also shows that at low energies (γ <sup>≈</sup> <sup>1</sup>) longitudinal fields **<sup>B</sup>** can be quite effective in manipulating the spin motion, but at high energies transverse fields **B<sup>⊥</sup>** need to be used to have any effect beyond the always present vertical holding field.

The acceleration of polarized beams in circular accelerators is complicated by the presence of numerous depolarizing spin resonances. During acceleration, a spin resonance is crossed whenever the spin precession frequency equals the frequency with which spin-perturbing magnetic fields are encountered. There are two main types of spin resonances corresponding to the possible sources of such fields: imperfection resonances, which are driven by magnet errors and misalignments, and intrinsic resonances, driven by the focusing fields.

The resonance conditions are usually expressed in terms of the spin tune νsp. For an ideal planar accelerator, where orbiting particles experience only the vertical guide field, the spin tune is equal to Gγ , as stated earlier. The resonance condition for imperfection depolarizing resonances arise when νsp <sup>=</sup> Gγ <sup>=</sup> <sup>n</sup>, where <sup>n</sup> is an integer. For proton beams, imperfection resonances are therefore separated by only 523 MeV energy steps. The condition for intrinsic resonances is νsp <sup>=</sup> Gγ <sup>=</sup> kP <sup>±</sup> νy , where <sup>k</sup> is an integer, νy is the vertical betatron tune and <sup>P</sup> is the superperiodicity. For example at the Brookhaven Alternating Gradient Synchrotron (AGS), <sup>P</sup> <sup>=</sup> 12 and νy <sup>≈</sup> <sup>8</sup>.8.

Close to a spin resonance the spin tune deviates away from its value of Gγ of the ideal flat machine. For a resonance with strength , which is the total spin rotation per radian of orbit deflection due to the resonance driving fields, the new spin tune is given by the equation

$$\cos\left(\pi\,\nu\_{sp}\right) = \cos\left(\pi\,G\nu\right)\cos\left(\pi\,\epsilon\right)\,\dots$$

**Fig. 1.1** The evolution of the spin tune during the crossing of a resonance at Gγ <sup>=</sup> <sup>K</sup> with strength

Figure 1.1 shows the solutions of this equation with and without a resonance. A similar calculation can be done for the effective precession direction or, as it is often called, the stable spin direction or **n0**. The stable spin direction describes those polarization components that are repeated every turn. Note that both the stable spin direction and the spin tune are completely determined by the magnetic structure of the accelerator and the beam energy. The magnitude and sign of the beam polarization, however, depend on the beam polarization at injection and the history of the acceleration process.

The spin tune and stable spin direction calculations apply only to a timeindependent static situation or if parameters are changed adiabatically. Far from the resonance the stable spin direction coincides with the main vertical magnetic field. Close to the resonance at Gγ <sup>=</sup> <sup>K</sup>, the stable spin direction is perturbed away from the vertical direction by the resonance driving fields. When a polarized beam is accelerated through an isolated resonance at arbitrary speed, the final polarization can be calculated analytically [2] and is given by

$$\frac{P\_f}{P\_l} = 2e^{-\frac{\pi \left| \epsilon \right|^2}{2\alpha}} - 1,$$

where Pi and Pf are the polarizations before and after the resonance crossing, respectively, and <sup>α</sup> is the change of (K <sup>−</sup> νsp) per radian of the orbit deflection. When the beam is slowly (<sup>α</sup> <sup>|</sup><sup>|</sup> 2) accelerated through the resonance, the spin vector will adiabatically follow the stable spin direction resulting in a spin flip as is indicated in Fig. 1.1. However, for a faster acceleration rate partial depolarization or partial spin flip will occur.

# **1.2 Polarized Proton Acceleration from ZGS to RHIC**

In the first efforts to accelerate polarized proton beams to high energy, the intrinsic resonances were overcome by using a betatron tune jump, which makes the resonance crossing speed α large, and the imperfection resonances were overcome with harmonic corrections of the vertical orbit to reduce the resonance strength . Both of these methods aim at making the resonance crossing non-adiabatic. They were used very successfully for the acceleration of polarized proton beams to high energy at the Argonne Zero Gradient Synchrotron (ZGS) and at the AGS. At the ZGS polarized protons were accelerated to 12 GeV/c in 1973, a maximum polarization of 70% was reached using tune jump quadrupoles [3]. Later, polarized protons were accelerated at the strong-focusing AGS to 22 GeV/c. The intrinsic resonance strengths at the strong-focusing AGS were much stronger than at the ZGS requiring stronger and faster pulsed quadrupoles [4]. Figure 1.2 shows the layout used at the AGS as well as tuning curves used to adjust the timing of the pulsed quadrupoles and the strengths of the correction dipoles. These resonance correction techniques require very accurate adjustments at every one of the many imperfection resonance crossings, which becomes very difficult and time consuming.

**Fig. 1.2** The first effort to accelerate polarized protons at the AGS used pulsed quadrupoles and correction dipoles, shown in the layout on the right to overcome depolarizing resonances. Typical tuning graphs for the pulsed quadrupole timing (top) and correction dipole strengths (bottom) are shown on the right [4]

Several new techniques to cross both imperfection and intrinsic resonances adiabatically have been developed at the AGS. The correction dipoles used to correct the imperfection resonance strength to zero were replaced by a localized spin rotator or 'partial Siberian snake', which makes all the imperfection resonance strengths large and causes complete adiabatic spin flip at every imperfection resonance [5]. The tune jump quadrupoles were initially replaced by a single rf dipole magnet, which increased the strength of the intrinsic resonances by driving large coherent betatron oscillations [6].

Later two strong partial Siberian snakes were installed in the AGS that can overcome both imperfection and intrinsic resonances. With strong enough partial snakes a gap between the spin tune and an integer opens up that becomes large enough to place the fractional part of the betatron tune and therefore the intrinsic resonance inside this gap. Figure 1.3 shows the measured asymmetry during acceleration in the AGS showing adiabatic spin flip at every integer value of Gγ .

At higher energies a 'full Siberian snake' [7], which is a 180◦ spin rotator of the spin about a horizontal axis, will keep the stable spin direction unperturbed at all times as long as the spin rotation due to the Siberian snake is much larger than the spin rotation due to the resonance driving fields. Therefore the beam polarization is preserved during acceleration. An alternative way to describe the effect of the Siberian snake comes from the observation that the spin tune with the snake is a

**Fig. 1.3** Left-right asymmetry measured by the AGS polarimeter during the acceleration cycle. Note that the measured asymmetry flips sign at every integer value of Gγ . The drop of the magnitude of the asymmetry during acceleration is mainly due to the decreasing analyzing power of the analyzing reaction of small-angle proton-carbon scattering

**Fig. 1.4** The RHIC accelerator complex with the elements required for the acceleration and collision of polarized protons highlighted

half-integer and energy independent. Therefore, neither imperfection nor intrinsic resonance conditions can ever be met as long as the betatron tune is different from a half-integer.

Figure 1.4 shows the lay-out of the Brookhaven accelerator complex highlighting the components required for polarized beam acceleration in the AGS and RHIC. The 'Optically Pumped Polarized Ion Source' [8] is producing 10<sup>12</sup> polarized protons per pulse. A single source pulse is captured into a single bunch, which is ample beam intensity to reach a RHIC bunch intensity of 2 <sup>×</sup> <sup>10</sup><sup>11</sup> polarized protons.

In the AGS two partial Siberian snakes are installed. One of them is an iron-based helical dipole [9] that rotates the spin by 11◦. The other is a superconducting helical dipole that can reach a 3 Tesla field and a spin rotation of up to 45◦ [10]. Both helical dipoles have the same design with a variable pitch along the length of the magnet to minimize orbit excursions and also to fit into the 3 m available straight sections in the AGS. With the two partial snakes strategically placed with one third of the AGS ring between them all vertical spin resonances can be avoided up to the required transfer energy to RHIC of about 25 GeV as long as the vertical betatron tune is placed at 8.98, very close to an integer [11]. This was achieved reliably over the whole acceleration cycle. With an 80% polarization from the source 65% polarization was reached at AGS extraction energy. The majority of the remaining polarization loss in the AGS comes from weak spin resonances driven by the horizontal motion of the beam.

The full Siberian snakes (two for each ring) and the spin rotators (four for each collider experiment) for RHIC each consist of four 2.4 m long, 4 T helical dipole magnet modules each having a full 360◦ helical twist. The two full snakes in RHIC both rotate the spin by 180◦ around an axis in the horizontal plane and are placed such that the beam deflection between the two snakes is exactly 180◦, which guarantees that the spin tune is energy independent. The spin tune is then given by

$$\nu\_{sp} = (\alpha\_b - \alpha\_a) / \pi \,.$$

Here αa and αb are the angles of the rotation axes of the two snakes relative to the beam direction. At RHIC these angles are ±45◦ to achieve a half-integer spin tune. A spin tune of 1/2 reduces the number of snake resonances to a minimum giving more room for placing the betatron tune. With such orthogonal snake rotation axes the spin tune is also independent of the betatron amplitude for a single spin resonance [12], which could also minimize the amplitude dependent spin tune shift in the presence of multiple resonances.

Figure 1.5 shows the circulating beam intensity in the blue and yellow ring, the measured circulating beam polarizations and luminosities of a RHIC store with a 255 GeV beam energy. A peak luminosity of about 2.5×10<sup>32</sup> cm−<sup>2</sup> <sup>s</sup>−<sup>1</sup> was reached. The beam polarization of about 55% was calibrated with an absolute polarimeter. This beam polarization is averaged over both beams and over the full store length of about 10 h [13]. To preserve beam polarization in RHIC during acceleration and storage the vertical betatron tune had to be controlled to better than 0.005 and

**Fig. 1.5** Circulating beam intensity in the blue and yellow ring and the measured circulating beam polarization in the blue and yellow RHIC ring (blue(dark) and yellow(light) symbols), respectively are shown in the top plot. The lower plot shows the luminosity at PHENIX (black) and STAR (red(grey)) collider experiments for one typical store

the orbit had to be corrected to better than 1 mm rms to avoid depolarizing snake resonances [14].

More than 20 years after Y. Derbenev and A. Kodratenko [7] made their proposal to use local spin rotators to stabilize polarized beams in high energy rings, it was demonstrated at RHIC that their concept is working flawlessly even in the presence of strong spin resonances at high energy.

Table 1.1 gives a concise overview of important milestones towards high energy polarized beam accelerator facilities.

# **1.3 Polarimetry, Spin Manipulation and Spin Flipping**

In addition to maintaining polarization, the accurate measurement of the beam polarization is of great importance. Very small angle elastic scattering in the Coulomb-Nuclear interference region offers the possibility for an analyzing reaction with a high figure-of-merit, which is not expected to be strongly energy dependent [15]. For polarized beam commissioning in the AGS and RHIC an ultra-thin carbon ribbon is used as an internal target, and the recoil carbon nuclei are detected to measure both vertical and radial polarization components. The detection of the recoil carbon with silicon detectors using both energy and time-of-flight information shows excellent particle identification. It was demonstrated that this polarimeter can be used to monitor polarization of high energy proton beams in an almost nondestructive manner and that the carbon fiber target could be scanned through the circulating beam to measure polarization profiles. A polarized atomic hydrogen jet was also installed in RHIC as an internal target for small angle proton-proton scattering, which allows the absolute calibration of the beam polarization to better than 3%.

Artificially driven spin resonances can be used to control the polarization of the stored proton beam. Typically a horizontal magnetic dipole field that is modulated at or close to the spin tune frequency is used. These devices are called either rf or ac dipoles depending on the frequency of modulation. As described above an rf dipole was used in the AGS to overcome intrinsic resonances. By ramping the drive frequency through the resonance condition a full spin flip can be achieved [16]. For RHIC with a spin tune of 0.5 the two resonances that a simple rf dipole produces interfere during the resonance crossing and prevent a full spin flip. A new device that consists of two ac dipoles with a spin rotator in between can avoid this problem by producing only a single resonance by properly adjusting the relative amplitude and phase of the ac dipole excitations [17].

This device can also be used to measure the spin tune. By adiabatically exciting the spin flipper at a drive tune close to the spin tune the beam polarization will be tilted away from the otherwise stable vertical direction. If the strength of the spin flipper is larger than the spin tune spread the whole beam polarization will tilt in the same way and can be measured with the polarimeter. The ratio of the vertical and


**Table 1.1** A list of polarized ion beam milestones (col. 1); col. 2: first polarized beam; col 3: polarized species accelerated; col. 4: beam momentum (proton);col.4:beampolarizationachieved(proton);col.6:milestone.Andthefuture:theelectronioncollider,underdesign,usingRHICringsforpolarizedp, horizontal polarization component is then proportional to the difference between the drive tune and the spin tune [20].

# **1.4 Accelerating Polarized Protons to Even Higher Energy**

The strength of imperfection resonances approximately increases linearly with energy and the strength of intrinsic resonances increases with the square root of the beam energy. To first order the total spin rotation due to all full or partial Siberian snakes will have to be at least as large as the total spin rotation due to the resonance driving term. More realistically the snakes should at least provide twice the spin rotation of the resonances. This simple rule fits the experience of the AGS, where the partial snakes can overcome the typical AGS resonance strengths of 0.07 and at RHIC, where the two snakes can overcome resonance strengths up to about 0.5. It follows that at higher energy than RHIC multiple snake pairs will be needed. For example, acceleration of polarized protons in the 7 TeV LHC would require at least 16 full snakes or 8 snake pairs to cope with the expected resonance strengths of about 4.

For a ring with N snakes pairs the spin tune is energy independent and equal to 1/2 if

$$\sum\_{i=1}^{N} \left(\theta\_b^{\bar{l}} - \theta\_a^{\bar{l}}\right) = \pi \text{ and } \sum\_{i=1}^{N} \left(\alpha\_b^{\bar{l}} - \alpha\_a^{\bar{l}}\right) / \pi = 1/2.$$

Here θ<sup>i</sup> <sup>a</sup>, θ<sup>i</sup> <sup>b</sup>, <sup>α</sup><sup>i</sup> <sup>a</sup>, and α<sup>i</sup> <sup>b</sup> are the azimuthal locations and snake rotation angles of the i-th snake pair, respectively. After satisfying the above conditions these parameters can then be chosen to maximize the beam polarization of particles with large betatron amplitude. This was first examined by K. Steffen [21]. S. Mane [22] showed that snake configurations with rotation axis angle that increase by equal amounts around the ring preserve the property of the two snake configuration of RHIC that the spin tune is independent of the beam emittance for an isolated single spin resonance and should therefore be a promising configuration with minimized amplitude dependent spin tune shift in the presence of multiple spin resonances. Figure 1.6 shows such configurations up to 16 snakes, which would, for example, be applicable to LHC with one snake pair per arc.

The increasing strength of intrinsic spin resonances can be overcome with an increasing number of properly configured Siberian snakes. However, the random residual orbit distortions, after orbit corrections have been performed, drive imperfection resonances that are unaffected by Siberian snakes. S.Y. Lee and E.D. Courant [23] have shown that the maximum tolerable strength for such a resonance is about 0.05. For RHIC this corresponds to about 250µm rms residual error of the vertical orbit, which is achievable. However, for LHC this translates to a very challenging 10 µm rms residual orbit error.

**Fig. 1.6** Multiple snake configurations of equally spaced Siberian snakes with rotation axis with a steadily increasing angle [22]. Such configurations have been shown to have an emittance independent spin tune in a single resonance model. The question marks mean that these colliders have stopped operation and have never been used for polarized protons

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 2 Spin Dynamics**

13

**François Méot**

*A Gérard Leleux*

**Abstract** This chapter is a general introduction to spin dynamics in beam lines and accelerators, and to resonant depolarization in cyclic accelerators.

# **2.1 Introduction**

This lecture is largely based on various of the founding theoretical papers and earlier lectures regarding spin dynamics in cyclic accelerators, including, especially, Saturne 1970s–1990s reports and lectures by Gérard Leleux et al. [1–5], theoretical work at the ZGS [6], and Courant and Ruth's 1980 BNL report [7].

Documentation used includes in addition the milestone articles by Thomas [8], Bargman et al. [9], Froissart and Stora [10], L.C. Teng [11], Montague [12], as well as reviews by Buon and Koutchouk [13], S. Mane et al. [14], and textbooks by S.Y. Lee [15], and Conte and MacKay [16].

F. Méot (-)

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Collider Accelerator, Brookhaven National Laboratory, Upton, NY, USA e-mail: fmeot@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_2

This list, although substantial, is far from exhaustive, however it is believed to be a sound starting point for further exploration and advanced knowledge, beyond the present brief theoretical introduction to spin dynamics and depolarizing resonances.

# **2.2 Spin Precession**

# *2.2.1 Magnetic Moment of a Spinning Charge*

Consider a mass with uniform density, spinning around its center of mass: *ρm* = *m/V* ; its spin angular momentum can be written

$$\mathbf{S} = \frac{m}{V} \int \mathbf{r} \times \mathbf{v}(\mathbf{r}) d^3 r \tag{2.1}$$

Assuming this volume uniformly charged, with density *ρq* = *q/V* , the resulting magnetic dipole moment reads

$$
\mu = \frac{q}{2V} \int \mathbf{r} \times \mathbf{v}(\mathbf{r}) d^3 r \tag{2.2}
$$

In this model, spin angular momentum **S** and resulting magnetic moment *μ* are colinear vectors and satisfy

$$
\mu = \frac{q}{2m}\mathbf{S} \tag{2.3}
$$

# *2.2.2 Spin Precession*

If a magnetic dipole *μ* is dipped in a magnetic field **B**, it undergoes a torque

$$
\boldsymbol{\pi} = \boldsymbol{\mu} \times \mathbf{B} \tag{2.4}
$$

This torque exerted by **B** causes *μ*, or equivalently its spin angular momentum **S**, to precess around **B**. The rate of change of the angular momentum is

$$\mathbf{r} \equiv \frac{d\mathbf{S}}{dt} = \underbrace{\mathbf{g}\,\frac{q}{2m}\mathbf{S} \times \mathbf{B}}\_{\text{equivalent }\mu} = \mathbf{S} \times \mathbf{\hat{z}}\tag{2.5}$$

**Fig. 2.1** A sketch of a torque effect in a current loop model. Assume *μ* due to a current loop: the change in angular momentum is the direction of the torque, i.e. sideways. The torque expresses as *τ* = **r** × *d***F** = **r** × *(***v** × **B***)dq* = *μ* × **B**

*<sup>g</sup>* <sup>=</sup> <sup>2</sup>*<sup>m</sup> q μ <sup>S</sup>* is the Landé factor, or gyromagnetic ratio. It takes the value *<sup>g</sup>* <sup>=</sup> <sup>2</sup> for a point particle. Note that Sect. 2.2 model for *<sup>μ</sup> <sup>S</sup>* isn't that far, a factor <sup>≈</sup>2 away (Eq. 2.3; Fig. 2.1).

Introduce the quantity *<sup>a</sup>* <sup>=</sup> *<sup>g</sup>* <sup>−</sup> <sup>2</sup> <sup>2</sup> , the gyromagnetic anomaly, a measure of the departure of *g* from 2 (usually noted *a* for leptons, G for hadrons). It takes the following values, for diverse particles:

$$\underbrace{1.159652 \times 10^{-3}}\_{\text{electron}}, \quad \underbrace{1.165921 \times 10^{-3}}\_{\text{ muon}}, \quad \underbrace{1.792847}\_{\text{proton}}, \quad \underbrace{-4.184153}\_{\text{helion}}, \quad \underbrace{0.14301}\_{\text{deuteron}} \tag{2.6}$$

# *2.2.3 Thomas-BMT Equation of Motion*

In accelerators and beam lines particles move in the fields of guiding, focusing and accelerating systems. These laboratory fields Lorentz-transform into a magnetic component **B**com in the particle frame (the electric component is ignored here, as it does not couple to the magnetic moment). A torque results, which writes

$$\frac{d\mathbf{S}}{dt} \equiv \mathbf{r} = (1+G)\frac{q}{m}\mathbf{S} \times \mathbf{B}\_{\text{com}}\tag{2.7}$$

Expressing **B**com in terms of the Lorentz transformed laboratory fields **B** and **E** (note that **E** contributes to **B**com) yields the Thomas-BMT equation of spin motion in the laboratory frame [9]

$$\frac{d\mathbf{S}}{dt} = \frac{q}{\gamma m} \mathbf{S} \times \left[ (1 + G\gamma) \mathbf{B}\_{\perp} + (1 + G) \mathbf{B}\_{\parallel} + \left( \frac{1}{\gamma + 1} + G \right) \gamma \frac{\mathbf{E} \times \mathbf{\mathcal{J}}}{c} \right] \tag{2.8}$$

wherein


Note that, from the expressions above it results that **S**· *d***S** *dt* <sup>=</sup> 0, which establishes that |**S**|=constant.

### **Two Comments**

1. In the combined torque

$$\frac{d\mathbf{S}}{dt} = \frac{q}{\nu m} \mathbf{S} \times \left[ \underbrace{(1 + G\boldsymbol{\gamma})\mathbf{B}\_{\perp} + (1 + G)\mathbf{B}\_{\parallel}}\_{\approx G\boldsymbol{\gamma}B} + \underbrace{\left(\frac{1}{\boldsymbol{\gamma} + 1} + G\right)\boldsymbol{\gamma}\frac{\mathbf{E} \times \boldsymbol{\mathcal{B}}}{c}}\_{\approx G\boldsymbol{\gamma}E/c} \right],$$

**E** ⊥ **v** and **B** ⊥ **v** components may be of comparable strengths, for instance in beam optics conditions where *B* ≈ 100 Gauss and *E* ≈ MV/m.

However, electric fields from accelerating RF cavities in circular accelerators are parallel to **v**, thus |**E** × **v**| is small. They may usually be ignored, such will be the case in studying depolarizing resonances in next sections.

2. Orbit perturbation by the magnetic moment of the particle will be ignored in the remainder of this chapter, the effect is negligible at energies of concern in accelerators. However, this is the origin of the Stern-Gerlach effect.

The Stern-Gerlach experiment (performed 3 years before Uhlenbeck and Goudsmit hypothesis of the spinning electron) proved that ("Bohr-Sommerfeld hypothesis") the direction of the angular momentum of atoms is quantized:


$$\mathbf{F} = \frac{d\mathbf{p}}{dt} = \boldsymbol{\mu} \cdot \mathbf{grad} \, \mathbf{B}$$

which stems from the non-uniform interaction (a differential effect) of the magnetic dipole with the field,

– deflections appear to be in two discrete directions (up and down, in the experiment), they do not yield a continuum of atom distribution in space (as would result from a continuum of magnetic moment orientations).

This deflection property by a non-uniform field allows guiding (using quadrupole fields) and focusing (using sextupole fields) of slow neutron beams (fermions with ±*h/*¯ 2 spin) along beam lines.

### **Example 1: Spin Precession Through a Dipole Magnet**

In the laboratory frame, the spin vector precesses by an angle

$$\phi\_{\text{sp,Lab}} = (1 + G\underline{\nu}) \times \stackrel{\text{trajectory}}{\alpha}$$

while the velocity vector precesses an angle *α*.

In the moving frame, spin precession amounts to

*φ*sp, moving frame = *Gγ α.*

### **Example 2: A Proton Orbiting in the Uniform Field of a Cyclotron Magnet**

*"Much of the physics of spin motion can be illustrated using the simplest model of a storage ring consisting of uniform horizontal bending and no straight sections." [12].*

The case of a 200 keV proton, *γ* = 1*.*000213, orbiting in the *(XLab, YLab)* plane is illustrated in Fig. 2.2. The number of spin precessions per turn amounts to

$$1 + G\gamma = 1 + 1.793229$$

in the laboratory frame.

By analogy with the betatron tune, the number of spin precessions per turn is the

$$\text{spin time:} \quad \nu\_{\text{sp}} = \frac{a\rho\_{\text{prec}} - a\rho\_{\text{rev}}}{a\rho\_{\text{rev}}} = G\chi^2$$

a quantity defined in the moving frame.

**Fig. 2.2** A proton is circling (solid line in the *(X*Lab*, Y*Lab*)* plane) in a uniform field normal to the orbit. The vector attached to the proton and pointing towards the *(X*Lab*.Y*Lab*)*-normal represents its spin, observed here in the moving frame. The magnitude of the spin component normal to the orbit is given on the *SZ* axis

Case of an integer number of spin precessions over a turn: νs p = Gγ = 2 here, spin motion closes on itself after a turn

Case of a fractional number of spin precessions over a turn: νs p = Gγ = 1.7932 here, spin motion starts at about 2 o'clock, it does not close after a turn

**Fig. 2.3** Case of a proton orbiting in a uniform field, projection of the spin vector in the bend plane, along the proton orbit, in the case of an integer or fractional *Gγ* value. (**a**) Case of an integer number of spin precessions over a turn: *νsp* = *Gγ* = 2 here, spin motion closes on itself after a turn. (**b**) Case of a fractional number of spin precessions over a turn: *νsp* = *Gγ* = 1*.*7932 here, spin motion starts at about 2 o'clock, it does not close after a turn

In Fig. 2.3 spin motion is observed in the moving frame, the figure shows the projection of the spin vector in the bend plane, in the case of an integer or fractional *Gγ* value.

### 2 Spin Dynamics 19

These basic aspects of spin motion are further exemplified in Sect. 2.4, as follows:


# **2.3 Depolarizing Resonances in Cyclic Accelerators**

In the bending magnets of a planar cyclic accelerator, spins precess around the vertical axis at a frequency sp. There is no precession in drift spaces, the orientation of the spin vector remains unchanged. In the perturbing fields resulting for instance from off mid-plane motion at main bend extremities (*Bs* <sup>=</sup> *∂By ∂s <sup>y</sup>*), or in quadrupole fields (*Bx* ∝ *y*), spins precess around a local non-vertical axis, with a related frequency pert*.*. If the two frequencies sp and pert*.* get close to one another, the average precession axis moves away from the vertical, the more so as perturbative fields are stronger, and this results in beam depolarization. The dynamics of resonant depolarization is studied with some detail in this Section, which owes much to Ref. [3].

# *2.3.1 Polarization*

A beam is a set of particles, polarization of a ±½ spin particle beam is defined as the statistical average

$$\overline{P} = \frac{n^\uparrow - n^\downarrow}{n^\uparrow + n^\downarrow}$$

with *n* ↑↓ the number of particles with spin "up" or "down", corresponding to the eigenstates ±*h/*¯ 2.

The average polarization behaves as a classical quantity, a spin 3-vector **S**, of which the evolution is


This is the principle of correspondence: "the expectation value of the vector operator representing the 'spin' will necessarily follow the same time dependence as one would obtain from a classical equation of motion." [9].

Spin 1 particles—deuteron for instance—have three eigenstates +*h,*¯ 0*,* −*h*¯. The polarization is the statistical average

$$\overline{P} = \frac{n^\uparrow - n^\downarrow}{n^\uparrow + n\_0 + n^\downarrow}$$

and follows the classical equation of spin motion. General considerations regarding spin transport in relation with accelerator design can be found in Ref. [16].

# *2.3.2 Perturbing (Depolarizing) Fields*

As aforementioned, electric fields from accelerating cavities are ignored, as they result in essentially **E v**. The differential equation of spin motion (Eq. 2.8) simplifies to

$$\frac{d\mathbf{S}}{dt} = \frac{q}{\gamma m} \mathbf{S} \times \left[ (1 + G\gamma) \mathbf{B}\_{\perp} + (1 + G) \mathbf{B}\_{\parallel} \right] \tag{2.9}$$

Writing it under the slightly different form

$$\frac{d\mathbf{S}}{dt} = \frac{q}{\nu m} \mathbf{S} \times \left[\mathbf{B} + G(\mathbf{B}\_{\parallel} + \boldsymbol{\gamma} \mathbf{B}\_{\perp})\right] \tag{2.10}$$

with **B** = **B**<sup>⊥</sup> + **B** the local field, the origin of depolarization is manifest: assume **S** essentially vertical and **B S**, thus *B γ B*<sup>⊥</sup> and

$$\frac{d\mathbf{S}}{dt} \propto \mathbf{S} \times \mathbf{B} \approx 0$$

whereas, any angle between **B** and **S** causes **S** to vary, *d***S** *dt* = 0. It can be concluded that depolarization results from transverse field components *Bx* or *Bs*.

Equation 2.9 shows in addition that spins **S** spread out, i.e. beam depolarizes, under the effect of


# *2.3.3 Re-write Thomas-BMT Equation of Motion*

Thomas-BMT equation of motion can be written with fields **B** and **B**<sup>⊥</sup> expressed in the moving frame, i.e., in terms of particle coordinates along the accelerator reference orbit, as it is the coordinates we use for particle dynamics in cyclic accelerators.

Start from the differential equation in the laboratory system:

$$\frac{d\mathbf{S}}{dt} = \frac{q}{\gamma m} \mathbf{S} \times \left[ (1 + G\gamma) \mathbf{B}\_{\perp} + (1 + G) \mathbf{B}\_{\parallel} \right] \tag{2.11}$$

Fields in this equation are defined in the laboratory system *(O*; *η, ξ, y)* (Fig. 2.4).

Resort to usual working hypotheses of particle dynamics:


### **Fig. 2.5** Moving frame

– magnetic field considered is of general form (dipoles and lenses),

$$\mathbf{B}(\mathbf{s}, \mathbf{x}, \mathbf{y}) = B\_s \mathbf{s} + B\_\mathbf{x} \mathbf{x} + B\_\mathbf{y} \mathbf{y}, \quad \text{arbitrary order in x, y}$$

Resort to the regular differential elements toolkit of particle dynamics:


$$d\rho \to \infty, \quad 1/\rho = 0, \; d\mathbf{x} = d\mathbf{s} = d\mathbf{y} = 0, \; ds \; \text{ is finite and} \\ d\theta = 0;$$

– develop kinematic terms to first order by virtue of

$$\frac{\mathbf{x}}{\rho} \ll \mathbf{x}' \ll \rho \mathbf{x}'' \ll 1; \quad \frac{\mathbf{y}}{\rho} \ll \mathbf{y}' \ll \rho \mathbf{y}'' \ll 1$$

# **Express B and B**<sup>⊥</sup> **in the Moving Frame**

The particle velocity writes

$$\mathbf{v}(\mathbf{v}, \mathbf{x}, \mathbf{y}) = \frac{d\mathbf{r}}{dt} = \frac{d\mathbf{r}}{ds}\frac{ds}{dt} = \frac{ds}{dt} \left[ \left( 1 + \frac{\mathbf{x}}{\rho} \right) \mathbf{s} + \frac{d\mathbf{x}}{ds} \mathbf{x} + \frac{d\mathbf{y}}{ds} \mathbf{y} \right]$$

This yields

$$\mathbf{B}\_{\parallel} = \frac{\mathbf{v}}{v} \left( \frac{\mathbf{v}}{v} \cdot \mathbf{B} \right) = \frac{ds}{dt} \frac{\mathbf{v}}{v^2} \begin{pmatrix} 1 + \frac{\chi}{\rho} \\ \chi' \\ \mathbf{y}' \\ \mathbf{y}' \end{pmatrix} \cdot \begin{pmatrix} B\_s \\ B\_\chi \\ B\_\mathbf{y} \end{pmatrix}$$

**Fig. 2.6** End field and off-mid plane *Bs* component, in a dipole magnet

From this intermediate result it can be observed that, to the first order in x, y,

 quadrupoles do not contribute **B***,* as *Bx* ∝ *y, Bs* = 0*, By* ∝ *x,* dipoles do, as **B***<sup>y</sup>* = *B*0**y**;their end fields too as **B***<sup>s</sup>* = *B*0*ρ*<sup>0</sup> *y ∂(*1*/ρ) ∂s* **s** (Fig. 2.6).

Note that *Bs* = *B*0*ρ*<sup>0</sup> *y d(*1*/ρ) ds* as used here, results from *∂Bs ∂y* <sup>=</sup> *∂By ∂s* 1 <sup>1</sup> <sup>+</sup> *<sup>x</sup> ρ* from Maxwell's equations ≈

*∂By ∂s* <sup>=</sup> *<sup>B</sup>*0*ρ*<sup>0</sup> *∂ ∂s* <sup>1</sup> *ρ* 

Writing the scalar product explicitly yields

$$\mathbf{v} \cdot \mathbf{B} = \frac{ds}{dt} \left[ (1 + \frac{x}{\rho}) B\_s + \frac{dx}{ds} B\_\chi + \frac{dy}{ds} B\_\chi \right]$$

$$\approx \frac{ds}{dt} (1 + \frac{x}{\rho}) \left[ B\_s + \frac{dy}{ds} B\_\chi (1 - \frac{x}{\rho}) \right] \approx \frac{ds}{dt} (1 + \frac{x}{\rho}) \left[ B\_s + \frac{dy}{ds} B\_\chi \right]$$

Consistently with the earlier hypothesis of a linear approximation of the equations of motion, drop terms quadratic in x, x', y' from |**v**| = *ds dt* <sup>1</sup> <sup>+</sup> *<sup>x</sup> ρ* <sup>+</sup> *<sup>x</sup>* <sup>2</sup> <sup>+</sup> *<sup>y</sup>* <sup>2</sup> <sup>1</sup>*/*<sup>2</sup> , thus **<sup>v</sup>** <sup>=</sup> *ds dt* <sup>1</sup> <sup>+</sup> *<sup>x</sup> ρ* **<sup>s</sup>**, yielding

$$\mathbf{B}\_{\parallel} = \frac{1}{v^2} \mathbf{v} \left( \mathbf{v} \cdot \mathbf{B} \right) = \left[ B\_s + \frac{d\mathbf{y}}{ds} B\_\mathbf{y} \right] \mathbf{s} \quad \text{and} \quad \mathbf{B}\_{\perp} = \mathbf{B} - \mathbf{B}\_{\parallel} = -\frac{d\mathbf{y}}{ds} B\_\mathbf{y} \mathbf{s} + B\_\mathbf{x} \mathbf{x} + B\_\mathbf{y} \mathbf{y}$$

Substitute **B**<sup>⊥</sup> and **B** in Eq. 2.11, this gives

$$\frac{d\mathbf{S}}{dt} = \frac{q}{\chi m} \mathbf{S} \times \left[ (\mathbf{l} + G) B\_3 \mathbf{s} + (\mathbf{l} + G \boldsymbol{\gamma}) B\_3 \mathbf{x} + (\mathbf{l} + G \boldsymbol{\gamma}) B\_3 \mathbf{y} + G(\mathbf{l} - \boldsymbol{\gamma}) \frac{d\mathbf{y}}{ds} B\_\mathbf{y} \mathbf{s} \right]$$

Now, back to laboratory coordinates (Fig. 2.4), using

$$\begin{cases} \mathbf{s} = \eta \cos \alpha - \xi \sin \alpha \\ \mathbf{x} = \eta \sin \alpha + \xi \cos \alpha \\ \mathbf{y} = \mathbf{y} \end{cases}$$

wherein *α(t)* represents the precession of the velocity vector and increases in bending magnets following *α(t)* = *βct/ρ*. This mapping yields

$$\frac{d\mathbf{S}}{dt} = \frac{q}{m\gamma} \mathbf{S} \times \left\{ \eta \left[ (1+G)B\_s \cos \alpha + G(1-\gamma) \frac{d\mathbf{y}}{ds} B\_\mathbf{y} \cos \alpha + (1+G\gamma)B\_x \sin \alpha \right] \right. \\ \left. \left. \left. \left( \begin{array}{c} -\mathbf{I} \\ \end{array} \right) \right|\_\text{F} + (1+G\gamma)B\_\mathbf{y} \sin \alpha \right] \right\} $$

$$ -\mathbf{f} \left[ (1+G)B\_\mathbf{x} \sin \alpha + G(1-\gamma) \frac{d\mathbf{y}}{ds} B\_\mathbf{y} \sin \alpha - (1+G\gamma)B\_\mathbf{x} \sin \alpha \right] $$

$$ + \mathbf{y} \qquad B\_\mathbf{y}(1+G\gamma) \right] \tag{2.12} $$

or, in projection on the laboratory *(η, ξ ,* **y***)* axes,

$$\frac{d}{dt}\begin{pmatrix} S\_{\eta} \\ S\_{\xi} \\ S\_{\chi} \end{pmatrix} = \frac{q}{m\chi} \mathbf{S} \times \begin{pmatrix} (1+G)B\_{\mathbf{s}}\cos\alpha + G(1-\chi)\frac{d\mathbf{y}}{ds}B\_{\mathbf{y}}\cos\alpha + (1+G\chi)B\_{\mathbf{x}}\sin\alpha \\\ -(1+G)B\_{\mathbf{s}}\sin\alpha - G(1-\chi)\frac{d\mathbf{y}}{ds}B\_{\mathbf{y}}\sin\alpha + (1+G\chi)B\_{\mathbf{x}}\cos\alpha \\\ B\_{\mathbf{y}}(1+G\chi) \end{pmatrix}$$

(2.13)

### **Comments**

Write the torque cross product:

$$\frac{d}{dt}\begin{pmatrix} S\_{\eta} \\ S\_{\xi} \\ S\_{\chi} \end{pmatrix} = \frac{q}{m\gamma} \begin{pmatrix} S\_{\eta} \\ S\_{\xi} \\ S\_{\chi} \end{pmatrix} \times \begin{pmatrix} \Omega\_{\eta} \\ \Omega\_{\xi} \\ \Omega\_{\chi} \end{pmatrix} = \frac{q}{m\gamma} \begin{pmatrix} S\_{\xi}\Omega\_{\chi} - S\_{\xi}\Omega\_{\xi} \\ S\_{\chi}\Omega\_{\eta} - S\_{\eta}\Omega\_{\chi} \\ S\_{\eta}\Omega\_{\xi} - S\_{\xi}\Omega\_{\eta} \end{pmatrix} \leftarrow \frac{\text{d}S\_{\text{y}}}{\text{dt}} \tag{2.14}$$

Explicit the components of the precession vector :

$$\begin{cases} \begin{aligned} \mathfrak{Q}\_{\eta} &= (1+G)B\_{x}\cos\alpha + G(1-\gamma)\frac{dy}{ds}B\_{y}\cos\alpha + (1+G\gamma)B\_{x}\sin\alpha & \text{permutation} \\ \mathfrak{Q}\_{\xi} &= -(1+G)B\_{x}\sin\alpha - G(1-\gamma)\frac{dy}{ds}B\_{\overline{y}}\sin\alpha + (1+G\gamma)B\_{x}\cos\alpha & \text{permutation} \\ \mathfrak{Q}\_{\overline{y}} &= B\_{\overline{y}}(1+G\gamma) & \text{main component} \end{aligned} \end{cases} \tag{2.15}$$

	- the perturbation (namely, the transverse components:*η* and *ξ* ) only appears if there is vertical motion;
	- quadrupole fields are the main contribution, as *Bx* = *G y* results in *dSy dt* = *Sηξ* − *Sξη* = 0 (Eq. 2.14). This is however a small quantity as *Sη*, *ξ* , *Sξ* and *η* all are presumably small quantities, thus the variation of *Sy* is slow. If x=0 then = *(η, ξ ,* 0*)* ⊥ **y**, i.e., the local precession axis is in the bend plane.

Consider fields along a 1-turn periodic closed orbit in a cyclic accelerator: they are 1-turn periodic, namely, **B***(α* + 2*π )* = **B***(α)*. As a consequence, is 1-turn periodic (Eq. 2.15),

$$
\mathfrak{Q}(\alpha + 2\pi) = \mathfrak{Q}(\alpha).
$$

thus, *(α)* describes the stable spin precession axis around the ring.

# *2.3.4 Integral Form of the Solution* **S***(θ )*

First simplify notations, by introducing the projection of **S** = ⎛ ⎝ *Sη Sξ Sy* ⎞ <sup>⎠</sup> in the bend plane, using the complex notation

$$s\_{\pi} = S\_{\eta} + jS\_{\xi} \tag{2.16}$$

Reducing the expression of the spin to two components is justified as the three coordinates of **S** are not independent: as the spin vector is normalized to 1, *sπ* yields the vertical spin component

$$S\_{\mathbb{Y}} = \sqrt{1 - |\mathbf{s}\_{\mathbb{Z}}|^2} \tag{2.17}$$

This allows re-writing the differential equation,

$$\begin{split} \frac{ds\_{\pi}}{dt} &= \frac{q}{\nu m} \left( -jB\_{\text{y}}(1+G\gamma)s\_{\pi} - S\_{\text{y}}e^{-j\alpha} \right. \\\\ &\times \left[ -j(1+G)B\_{\text{y}} + (1+G\gamma)B\_{\text{x}} - jG(1-\gamma)\frac{d\text{y}}{ds}B\_{\text{y}} \right] \end{split} \tag{2.18}$$

Introduce the guiding field *By*<sup>0</sup> <sup>=</sup> *<sup>B</sup>*0*ρ*<sup>0</sup> *ρ*0 , so that

– *By (θ )* = *By*0*(θ )* + *By (θ )* – *By*<sup>0</sup> = 0 in dipoles only

$$-\begin{array}{c} \text{-} \\ \text{- } \Delta B\_{\text{y}} \text{ is a perturbation, namely,} \\ \text{- } \begin{cases} = B\_{\text{y}0} \frac{n}{\rho\_{0}} x \text{ in combined function dipoles.} \\ \propto y^{k} \text{ in multiples} \\ \text{other dipolar field perturbation} \end{cases} \end{array}$$

– *dy ds By*0: results from vertical motion slope in main bends, in general a small effect.

The differential equation can thus be written

$$\frac{ds\_{\pi}}{dt} = \frac{q}{m\gamma} \left\{-jB\_{\gamma0}(1+G\gamma)s\_{\pi} - j\Delta B\_{\gamma}(1+G\gamma)s\_{\pi}\right\}$$

$$-S\_{\text{y}}e^{-j\alpha} \left[-j(1+G)B\_{\text{s}} + (1+G\gamma)B\_{\text{x}} - jG(1-\gamma)\frac{dy}{ds}B\_{\text{y0}}\right]\Big|\_{\pi}$$

Introduce the orbital angle

$$
\theta = \frac{s}{R}, \quad \text{such that } \oint d\theta = \oint \frac{ds}{R} = \frac{2\pi R}{R} = 2\pi
$$

*<sup>R</sup>* <sup>=</sup> <sup>C</sup> 2*π* denotes the mean radius of the orbit—in cyclic accelerators the use of *θ* is justified by the use of Fourier series developments. The angular velocity of the particle along the reference orbit is

$$a \alpha = \frac{d\theta}{dt} = \frac{\beta c}{R}.$$

### 2 Spin Dynamics 27

Take in addition

$$\frac{ds}{d\theta} = \frac{1}{\alpha \rho} \frac{ds}{dt} \quad \text{and} \quad \frac{q}{m\gamma \alpha \alpha} = \frac{qR}{m\gamma \beta c} = \frac{R}{p/q} = \frac{R}{B\_{\text{\textdegree 0}} \rho \alpha}$$

with *By*<sup>0</sup> = 0 the field in the dipoles and *ρ*<sup>0</sup> their curvature radius. Introduce also 1. the instantaneous spin precession angular frequency in dipoles:

$$\omega\_{\rm sp} = \frac{(1 + G\gamma)2\pi}{T\_{\rm dip}}, \text{ while } \frac{T\_{\rm dip}}{T\_{\rm rev}} = \frac{\rho\_0}{R}, \text{ thus } \omega\_{\rm sp}(\theta) = \begin{bmatrix} (1 + G\gamma)\frac{R}{\rho\_0}\omega\_0\\ \rho\_0\\ 0 \text{ outside bands} \end{bmatrix}$$

2. and, in order to simplify notations, the following factors:

$$\lambda\_{\chi} = (1 + G\gamma) \frac{R}{\rho\_0}, \quad \lambda\_{\chi} = -j(1 - \gamma)G \frac{R}{\rho\_0}, \quad \lambda\_s = -j(1 + G) \frac{R}{\rho\_0}$$

$$\text{and } \frac{\Delta \alpha\_{\text{sp}}}{\alpha\_0} = (1 + G\gamma) \frac{R}{\rho\_0} \frac{\Delta B\_{\text{y}}}{B\_{\text{y}0}}$$

Substituting in *dsπ dt* yields the equation of motion

$$\frac{ds\_{\pi}}{d\theta} = \underbrace{-j\frac{\alpha\_{\text{sp}}(\theta)}{\alpha\_{0}}s\_{\pi}}\_{\text{fundamental}} - \underbrace{\overbrace{s\_{\text{y}}e^{-j\alpha}\left[\lambda\_{\text{s}}\frac{B\_{\text{s}}}{B\_{\text{y}0}} + \lambda\_{\text{x}}\frac{B\_{\text{x}}}{B\_{\text{y}0}} + \lambda\_{\text{y}}\frac{dy}{ds}\right]}\_{\text{term}} + \overbrace{-j\frac{\Delta\alpha\_{\text{sp}}(\theta)}{\alpha\_{0}}s\_{\pi}}\_{\text{perturbation}}$$

or, in a compact form,

$$\frac{d\mathbf{s}\_{\pi}}{d\theta} = -j\frac{a\_{\rm sp}(\theta)}{a\_{0}}\mathbf{s}\_{\pi} + f(\theta) \tag{2.20}$$

### **A Summary of the Origin of Spin Motion Perturbations**

It results from Eq. 2.19 that

	- a mid-plane offset defect: this causes *Bs(y* = 0*)* = 0,
	- sextupoles: *By* <sup>=</sup> *H (x*<sup>2</sup> <sup>−</sup> *<sup>y</sup>*2*)*,
	- solenoidal field: non-zero *Bs*,
	- or, if the equation of spin motion is developed to second or higher order in particle coordinates (whereas kinematic terms have been limited to first order, in the present working hypotheses);
	- in combined function dipoles: the field index *<sup>n</sup>* = − *<sup>ρ</sup>*<sup>0</sup> *By*<sup>0</sup> *∂By ∂x* results in *By (x)* ∝ *x*,
	- in multipoles: *By* = −*Gy* (skew quad); *By* <sup>=</sup> *H (x*<sup>2</sup> <sup>−</sup> *<sup>y</sup>*2*)* (sextupole), etc.,

and does not depolarize, it only results in a modulation of the precession frequency, *ω*sp ∝ *By* .

### **2.3.4.1 Solve the Unperturbed Equation of Motion**

The unperturbed equation writes (Eq. 2.20 with *f (θ )* = 0)

$$\frac{ds\_{\pi}}{d\theta} = -j\frac{\alpha\_{\text{sp}}(\theta)}{\alpha\_{0}}s\_{\pi} \tag{2.21}$$

which readily integrates, namely,

$$s\_{\pi}(\theta) = C \, e^{-j \int\_0^{\theta} \frac{a \mathbf{s}\_{\text{sp}}(\theta')}{a \omega\_0} \, d\theta'}$$

Using

1. *<sup>ω</sup>*sp *ω*0 = ⎡ ⎣ *(*1 + *Gγ ) R ρ* inside dipoles *(R* = C */* 2*π,* mean radius*)* 0 outside dipoles 2. given that *<sup>θ</sup>* 0 *ω*sp*(θ ) ω*0 *dθ* only changes in dipoles, in which *dθ* <sup>=</sup> *ds <sup>R</sup>* <sup>=</sup> *<sup>ρ</sup> <sup>R</sup> dα,*

thus *<sup>θ</sup>* 0 *ω*sp *ω*0 *dθ* = *(*1 + *Gγ ) R ρ ρ R dα* <sup>=</sup> *(*<sup>1</sup> <sup>+</sup> *Gγ ) α* \$ assuming *<sup>α</sup>* and *<sup>θ</sup>* have same origin *,* and the expected solution results, namely a motion of rotation,

$$s\_{\pi}(\theta) = C \, e^{-j(1+G\gamma)\alpha(\theta)} = C \left[ \underbrace{\cos(1+G\gamma)\alpha}\_{S\_{\eta}} - j \underbrace{\sin(1+G\gamma)\alpha}\_{-S\_{\xi}} \right] \tag{2.22}$$

wherein *α* is a function of *θ* = *s/R*. Note that this expression is consistent with the absence of rotation in drifts, in which *α* does not change (whereas *θ* = *s/R* does): *sπ (θ )*=constant along drifts, spin does not precess.

### **2.3.4.2 Solve the Perturbed Equation of Motion**

Equation 2.20 can be solved using the method of variation of the constant, as follows.

Look for *sπ (θ )* with the very form of the unperturbed solution, yet with the integration constant now a function of *(θ )*, namely (Eq. 2.22),

$$\text{s.s.}\, (\theta) = C(\theta) \, \text{s}\_{\text{ $\pi$ , unpert.}}(\theta) \quad \text{wherein} \, \text{s}\_{\text{ $\pi$ , unpert.}}(\theta) = e^{-j(1+G\gamma)a(\theta)} \quad (2.23)$$

This yields

$$\frac{d\mathbf{s}\_{\overline{\pi}}}{d\theta} = \frac{dC(\theta)}{d\theta}\mathbf{s}\_{\overline{\pi}, \text{unpert.}} + C(\theta)\frac{d\mathbf{s}\_{\overline{\pi}, \text{unpert.}}}{d\theta}$$

which, accounting for Eqs. 2.20 and 2.21, yields

$$\frac{d\mathcal{C}}{d\theta} \,\, s\_{\pi,\text{unpert.}}(\theta) = f(\theta).$$

Solving the perturbed equation of motion (Eq. 2.23) is thus transposed to the question of solving

$$\frac{d\mathcal{C}}{d\theta} = \frac{f(\theta)}{s\_{\pi, \text{unpert.}}(\theta)} = f(\theta) \, e^{j(1 + G\gamma)\alpha(\theta)}\tag{2.24}$$

as the integration of *dC/dθ* yields the perturbed spin motion *sπ (θ )* = *C(θ ) sπ,*unpert.*(θ )*. Following what, the quantity of interest, which is the vertical component of the polarization vector, *Sy* , is obtained using (after Eqs. 2.17 and 2.23, and given that |*sπ,*unpert.| = 1)

$$\mathcal{S}\_{\mathcal{Y}} = \sqrt{1 - |\mathbf{s}\_{\pi}|^2} = \sqrt{1 - |\mathbf{C}|^2} \tag{2.25}$$

# *2.3.5 Linear Resonances*

Re-write Eq. 2.24 under the form

$$-\frac{1}{S\_{\text{y}}}\frac{dC}{d\theta} = \underbrace{\left[\lambda\_{s}\frac{B\_{\text{y}}}{B\_{\text{y}0}} + \lambda\_{\text{x}}\frac{B\_{\text{x}}}{B\_{\text{y}0}} + \lambda\_{\text{y}}\frac{dy}{ds}\right]}\_{\text{perturbation}}e^{-j\left(G\gamma(\theta-\alpha)\right)}e^{j\left(G\gamma\theta\right)}\tag{2.26}$$

wherein the explicit expression for *f (θ )* (Eq. 2.19) has been substituted (ignoring the *ω*sp term, as it only causes a precession frequency modulation).

In further Fourier transforms, periodicity of the boxed factor in Eq. 2.26 matters:

	- *Bs* ∝ *y* from main dipoles, *Bx* ∝ *y* = *y*co + *y*<sup>β</sup> from quadrupoles,
	- *Bx* ∝ *x* = *x*co + *x*<sup>β</sup> as well from skew quadrupole components,
	- *Bx* <sup>∝</sup> *<sup>y</sup>*2*, xy*, etc., from non-linear multipoles;
	- *y*co*(θ )* is 2*π*-periodic,

$$\begin{array}{ll} \text{--} & \text{y}\_{\mathbb{R}}(\theta) = \sqrt{\beta\_{\text{y}} \frac{\varepsilon\_{\text{y}}}{\pi}} \cos(\int \frac{ds}{\theta} + \varphi\_{\text{y}}) = \overbrace{F\_{\text{y}}(\theta) \underbrace{e^{j\left(\upsilon\_{\text{y}}\theta + \varphi\_{\text{y}}\right)}}\_{\frac{2\pi}{\upsilon\_{\text{y}}} - \text{periodic}}}^{\text{Frceil-} \text{factor}} (\text{CC=complex conjugate}), \text{ etc} \\\\ \text{where} & \text{the Floquet factor } F\_{\text{y}}(\theta) = \frac{1}{2} \sqrt{\beta\_{\text{y}}(\theta) \frac{\varepsilon\_{\text{y}}}{\pi}} e^{j\left(R \int\_{0}^{\theta} \frac{d\theta}{\beta\_{\text{y}}(\theta)} - \upsilon\_{\text{y}}\theta\right)} \text{ is } \frac{2\pi}{M} - \text{periodic}. \end{array}$$

The expected energies (*Gγ* values) where spin precession resonates with transverse field torques can be inferred from what precedes: a Fourier development of the boxed factor [pert*.*] × *<sup>e</sup>*−*jGγ (θ* <sup>−</sup> *α)* of Eq. 2.26 will evidence the resonant conditions,

$$\underbrace{[\text{pert.}] \times e^{-j\,G\,\gamma(\theta-\alpha)}}\_{\text{closed orbit}} + \underbrace{\sum\_{n} \beta\_{\text{y}} \epsilon\_{n} e^{-j\,(nM \pm \nu\_{\text{y}})\theta}}\_{\text{quadratic}: \text{B}\_{\text{R}}=\text{G}\,\text{y}} + \underbrace{\sum\_{n} \beta\_{\text{x}} \epsilon\_{n} e^{-j\,(nM \pm \nu\_{\text{x}})\theta}}\_{\text{skew quadrodes: B}=\text{G}}$$

wherein co*n*, *<sup>β</sup>*<sup>y</sup> *n*, *<sup>β</sup>*<sup>x</sup> *n* are the respective Fourier amplitudes of the field contributions along the closed orbit, and along the vertical an horizontal betatron excursions. Sources of resonance excitation are as indicated: radial field along the closed orbit, and quadrupole fields. Thus, integration of *dC/dθ* (Eq. 2.26) produces terms of the form

$$\underbrace{\begin{array}{c} e^{j}(n - G\gamma)\theta \\ \hline \end{array}}\_{}, \qquad \underbrace{\begin{array}{c} e^{-j}(nM \pm \upsilon\_{\text{y}} - G\gamma)\theta \\ \hline \end{array}}\_{}, \quad \frac{e^{-j}(nM \pm \upsilon\_{\text{y}} - G\gamma)\theta}{}, \quad \frac{e^{-j}(nM \pm \upsilon\_{\text{x}} - G\gamma)\theta}{}$$

 imperfection resonances located at *Gγ* = integer

with "imperfection resonances" arising under the effect of fields experienced due to a non-vanishing vertical closed orbit, and "intrinsic resonances" arising under the effect of fields experienced due to betatron motion, either vertical or horizontal.

### **2.3.5.1 Strength of Imperfection Depolarizing Resonances**

Imperfection, or integer, depolarizing resonances are driven by a non-vanishing vertical closed orbit *y*co*(θ )* which causes spins to experience 1-turn periodic radial fields in quadrupoles (the main source of spin perturbation transverse fields)

$$B\_{\chi}(\theta) = G \circ (\theta) = K(\theta) \times B\_0 \rho\_0 \times \chi\_{\text{co}}(\theta).$$

Resonance occurs if the spin undergoes an integer number of precessions over a turn (it then undergoes 1-turn-periodic torques), so that spin tilts at field perturbations along the closed orbit add up coherently. Thus resonances occur at integer values

$$G\gamma\_n = n$$

Ignoring dipole end fields (*Bs* contribution) and *dy/ds* terms in the perturbation (Eq. 2.26) as they are weak effects compared to quadrupole fields in strong focusing lattices, the perturbation function (Eq. 2.19, with *B*<sup>0</sup> denoting the guide field, here) reduces to

$$f(\theta) = -S\_{\text{y}}e^{-j\alpha}\lambda\_{\text{x}}\frac{B\_{\text{x}}}{B\_{0}} = -S\_{\text{y}}e^{-j\alpha}\lambda\_{\text{x}}K\rho\_{0}\mathbf{y}\_{\text{co}}\ \left[\text{with }\lambda\_{\text{x}} = (1+G\gamma)\frac{R}{\rho\_{0}}\right]$$

and the differential equation for *C* (Eq. 2.26) takes the form

$$1 - \frac{1}{S\_{\text{y}}} \frac{dC}{d\theta} = \underbrace{\lambda\_{\text{x}} \rho\_{0} K\left(\theta\right) \underbrace{e^{-jG\gamma\theta \hat{\theta}} \overbrace{e^{-jG\gamma\theta - \alpha}}^{\text{cell-periodic}}}\_{\text{1-turn periodic}} e^{jG\chi\theta}$$

The periodic coefficient can be developed in Fourier series over a turn as this is the periodicity of the closed orbit *y*co*(θ )*,

$$\lambda\_{\chi} \rho\_0 K(\theta) \text{ y}\_{\text{co}}(\theta) \, e^{-jG\chi}(\theta - \alpha) \, = \sum\_{n = -\infty}^{+\infty} \epsilon\_n^{\text{imp}} e^{-jn\theta}$$

with the harmonic strength given by

$$\epsilon\_n^{\rm imp} = \frac{\lambda\_\times \rho\_0}{2\pi} \oint K(\theta) \left. \chi\_\infty(\theta) \, e^{-j \, G \chi(\theta - \alpha)} \, e^{j n \theta} \, d\theta$$

which yields

$$-\frac{1}{S\_{\text{\textdegree}}} \frac{dC}{d\theta} = \sum\_{n} \epsilon\_{n}^{\text{imp}} \, e^{j(G\chi - n)\theta} \tag{2.27}$$

*dC dθ* is slowly varying if *Gγ* <sup>−</sup> *<sup>n</sup>* <sup>≈</sup> 0, i.e. near the resonance. On the resonance the strength expresses as

$$
\epsilon\_n^{\rm imp} = \frac{\lambda\_\times \rho\_0}{2\pi} \oint K(\theta) \, \text{y}\_\infty(\theta) \, e^{\not j \, G \, \text{y}\_n \, \alpha} \, d\theta \tag{2.28}
$$

In the thin-lens approximation, take *(θ )Qpole* = *Li/R* the orbital extent of quadrupole i located at *si* = *s(θ* = *θi)*, the integral & simplifies to a discrete sum over the quadrupoles. Note *(KL)i* the integrated strength, *y*co*(θi)* the local value of the closed orbit and *αi* the cumulated orbit deviation at quadrupole i location. The strength of the *Gγn* harmonic then writes

$$\begin{Bmatrix} \mathcal{R}e(\epsilon\_n^{\text{imp}})\\ \mathcal{I}m(\epsilon\_n^{\text{imp}}) \end{Bmatrix} = \frac{1 + G\boldsymbol{\gamma}\_n}{2\pi} \sum\_{\text{Qpoles}} \begin{Bmatrix} \cos G\boldsymbol{\gamma}\_n \boldsymbol{\alpha}\_l\\ \sin G\boldsymbol{\gamma}\_n \boldsymbol{\alpha}\_l \end{Bmatrix} (KL)\_l \ \boldsymbol{\text{y}}\_{\text{co}}(\boldsymbol{\theta}\_l) \tag{2.29}$$

Note: in a combined function magnet lattice, BNL AGS for instance, *y*co*(θi)* may vary significantly over a main dipole, slicing may be required for this series to converge with sufficient accuracy (5 slices about in the AGS case).

From the expression of the closed orbit in Eq. 2.30, it appears that orbit harmonics near the betatron tune (*n* = *Gγn* ≈ *νy* ) excite strong resonances. Imperfection resonance strength is further amplified in P-superperiodic rings, with M-cell superperiods, if the betatron tune *νy* ≈ integer × *M* × *P* [15, Chap.3-I].

### **Amplification Near Orbit Harmonics**

In the presence of field defects *Bx(s)* experienced in quadrupoles due to nonvanishing vertical closed orbit, the vertical equation of motion of a particle writes

$$\frac{d\mathbf{y}^2}{ds^2} + K\_\mathbf{y}(\mathbf{s})\,\mathbf{y} = \frac{\Delta B\_\mathbf{x}(\mathbf{s})}{B\rho}$$

Substitute the Courant variables

$$
\eta = \frac{y}{\sqrt{\beta\_{\rm y}}} \quad \text{and} \quad \varphi = \frac{1}{\nu\_{\rm y}} \int \frac{ds}{\beta\_{\rm y}}
$$

### 2 Spin Dynamics 33

this yields

$$\frac{d\eta^2}{d\varphi^2} + \nu\_\text{y}^2 \eta = \nu\_\text{y}^2 \beta\_\text{y}^{3/2} \frac{\Delta B\_\text{x}(\text{s})}{B\rho} = \sum\_{n=-\infty}^{+\infty} c\_n e^{jn\varphi}$$

wherein

$$c\_n = \frac{\nu\_y^2}{2\pi} \int\_0^{2\pi} \beta\_y^{3/2} \frac{\Delta B\_x}{B\rho} \, e^{-j n \varphi} \, d\varphi$$

Assuming perturbative field integrals *(Bx l)k* at locations *sk*, the 1-turn closed solution expressed under the form *η* = \* *<sup>n</sup> ηn <sup>e</sup>j nϕ* satisfies

$$\eta(s) = \underbrace{\begin{array}{c} \text{weight of defects} \\ \text{in focusing quads} \\ \frac{\text{V}\_{\text{CO}}(s)}{\text{\textdegree}} = \frac{\text{\textdegree\textquotedblleft}}{2\pi} \sum\_{k}^{\text{\textquotedblleft}} \sqrt{\beta\_{\text{V}}(s\_{k})} \frac{(\Delta B\_{k} I)\_{k}}{B\rho} \end{array}}\_{\begin{subarray}{c} \text{\textquotedblleft}} \text{\textquotedblleft} \beta\_{\text{V}}(s\_{k}) \end{subarray}} \underbrace{(\Delta B\_{k} I)\_{k}}\_{\begin{subarray}{c} \text{\textquotedblleft} \infty \text{-} \infty \text{\$} (\boldsymbol{\varphi} - \boldsymbol{\varphi}(\text{s}\_{k})) \\ \text{\textquotedblright} \\ \text{in focusing quads} \end{subarray}} + \underbrace{\sum\_{n=-\infty}^{+\infty} \cos n (\boldsymbol{\varphi} - \boldsymbol{\varphi}(\text{s}\_{k}))}\_{\begin{subarray}{c} \text{\textquotedblleft} \infty \text{-} \infty \text{-} \end{subarray}} \underbrace{\begin{subarray}{c} \text{\textquotedblleft} \infty \text{-} \infty (\boldsymbol{\varphi} - \boldsymbol{\varphi}(\text{s}\_{k})) \\ \text{\textquotedblleft} \end{subarray}} \underbrace{\begin{subarray}{c} \text{\textquotedblleft} \infty \text{-} \infty (\boldsymbol{\varphi} - \boldsymbol{\varphi}(\text{s}\_{k})) \end{subarray}} \underbrace{\begin{subarray}{c} \text{\textquotedblleft} \infty \text{-} \infty (\boldsymbol{\varphi} - \boldsymbol{\varphi}(\text{s}\_{k})) \end{subarray}} \tag{2.30}$$

This shows the efficiency of harmonic orbit correction in minimizing the strength of imperfection resonances or, conversely, harmonic orbit excitation in enhancing the resonance strength so as to induce spin flipping (Chap. 5.2.1).

### **Example: Imperfection Resonances in BNL AGS Booster**

The AGS injector ring (AGS Booster) is described in Chap. 14 which may be referred to for details. This example is part of the resonance study and spin dynamics simulations proposed in that chapter.

A random vertical closed orbit of peak amplitude *y*ˆco = 1 mm is excited by a random vertical offset of the main quadrupoles. Figure 2.7 displays the resulting Fourier spectrum (after Eq. 2.29). The effect of these resonances on the vertical spin component of a polarized helion accelerated over *Gγ* : −4*.*19 → −16 through these resonances is illustrated in Fig. 2.8.

### **2.3.5.2 Strength of Intrinsic Depolarizing Resonances**

Intrinsic depolarizing resonances are driven by betatron motion, their effect on spin depends upon betatron amplitude and phase, their effect on beam polarization depends on beam emittance. In strong focusing synchrotrons they are driven mostly by the radial field components met in quadrupoles namely

**Fig. 2.7** Normalized spectrum | imp *<sup>n</sup>* |*/y*ˆ of the integer depolarizing resonances, *Gγn* = integer, in the AGS Booster. Case here of 3He2<sup>+</sup> ion, G = <sup>−</sup>4*.*<sup>18</sup>

**Fig. 2.8** Evolution of the vertical spin component *Sy* during acceleration through imperfection resonances in the AGS Booster

$$B\_{\chi}(\theta) = G \circ (\theta) = K(\theta) \times B\_0 \rho\_0 \times \mathbf{y}\_{\beta}(\theta) \tag{2.31}$$

whereas longitudinal *Bs* from dipole ends, as well as the effect of *dy/ds* in *f (θ )*, Eq. 2.19, are usually weak effects by comparison and ignored. Note that the contrary held in the ZGS, which was a zero-index lattice, thus with no radial fields, and excitation of depolarizing resonances arising from main dipole end fields. The location of intrinsic resonances depends on betatron tune, it is given in an Mperiodic structure by

$$G\gamma\_n = nM \pm \nu\_\mathcal{Y}$$

The perturbation function (Eq. 2.19, with *B*<sup>0</sup> the guide field) reduces to

$$f(\theta) = -S\_{\circ}e^{-j\alpha}\lambda\_{\chi}\frac{B\_{\chi}}{B\_{0}} = -S\_{\circ}e^{-j\alpha}\lambda\_{\chi}K\rho\_{0}\mathbf{y}\_{\beta} \quad \left[\text{with }\lambda\_{\chi} = (1+G\gamma)\frac{R}{\rho\_{0}}\right]$$

and the differential equation for *C* (Eq. 2.26) takes the form

$$-\frac{1}{S\_{\text{y}}}\frac{dC}{d\theta} = \lambda\_x \rho\_0 K(\theta) \,\text{y}\_{\beta}(\theta) \, e^{-jG\chi(\theta-\alpha)} e^{jG\chi\theta}$$

Substituting *yβ(θ )* <sup>=</sup> *Fy (θ ) ej (νyθ* <sup>+</sup> *ϕy)* <sup>+</sup> *CC* yields

$$-\frac{1}{S\_{\text{y}}}\frac{dC}{d\theta} = \lambda\_x \rho\_0 K(\theta) \left( F\_{\text{y}} \, \epsilon^j (\upsilon\_{\text{y}}\theta + \varphi\_{\text{y}}) \, \, \, \, \, \, F\_{\text{y}}^\* \, \, \epsilon^j (\upsilon\_{\text{y}}\theta + \varphi\_{\text{y}}) \right) \, \, \epsilon^{-j} G \gamma(\theta - a) \, \,\_{\mathfrak{E}}jG\gamma\theta$$

and

$$\begin{split} -\frac{1}{S\_{\text{y}}} \frac{dC}{d\theta} &= \lambda\_{\text{x}} \rho\_{0} \left( \underbrace{K(\theta)F\_{\text{y}}e^{-j\left[G\gamma(\theta-\alpha)\right]}}\_{\text{cell periodicity}} e^{j\left[(G\gamma+\nu\_{\text{y}})\theta+\varphi\_{\text{y}}\right]} \right. \\\\ &+ K(\theta)F\_{\text{y}}^{\*}e^{-j\left[G\gamma(\theta-\alpha)\right]}e^{j\left[(G\gamma-\nu\_{\text{y}})\theta-\varphi\_{\text{y}}\right]} \end{split}$$

Develop the cell-periodic factor in Fourier series, this gives

$$-\frac{1}{S\_{\text{y}}}\frac{dC}{d\theta} = \left(\sum\_{n=-\infty}^{+\infty} \epsilon\_n^{\text{intra}} e^{-jn\theta}\right) e^{j\left[\left(G\gamma + \nu\_{\text{y}}\right)\theta + \varphi\_{\text{y}}\right]} \qquad (2.32)$$

$$+ \left(\sum\_{n=-\infty}^{+\infty} \epsilon\_n^{\text{intra}} e^{-jn\theta}\right) e^{j\left[\left(G\gamma - \nu\_{\text{y}}\right)\theta - \varphi\_{\text{y}}\right]}$$

with *n* a multiple of the number of cells *M* in a perfect ring. The amplitudes of the two families of Fourier harmonics are given by the integrals

$$
\epsilon\_n^{\text{intr}^+} = \frac{\lambda\_X \rho\_0}{2\pi} \int\_0^{2\pi} K \, F\_\text{y}(\theta) \, e^{-jG} \mathcal{Y} \gamma(\theta - \alpha) \, \_\text{e} jn\theta \, d\theta,\tag{2.33}
$$

$$
\epsilon\_n^{\text{intr}^-} = \frac{\lambda\_X \rho\_0}{2\pi} \int\_0^{2\pi} K \, F\_\text{y}^\*(\theta) \, e^{-jG} \mathcal{Y} \gamma(\theta - \alpha) \, e^{jn\theta} d\theta
$$

Substitute the Floquet factor *Fy (θ )* <sup>=</sup> <sup>1</sup> 2 *βy(θ ) y π e j s(θ)* 0 *ds βy (θ)* − *νyθ* , this yields

$$\epsilon\_n^{\text{intr}\pm} = \frac{\lambda\_\text{x}\rho\_0}{4\pi} \int\_0^{2\pi} K(\theta) \sqrt{\beta\_\text{y}(\theta)} \frac{\varepsilon\_\text{y}}{\pi} e^{\pm j\left(\int\_0^{\chi(\theta)} \frac{ds}{\overline{\beta\_\text{y}}} - \nu\_\text{y}\theta\right)} e^{-jG\chi(\theta - \alpha(\theta))} \,\_\text{e}^j jn\theta \,\_\text{d} \theta$$

Near the resonance *Gγ* ± *νy* − *n* → 0, hence the resonance strength,

$$\epsilon\_n^{\text{intr}^\pm} \approx \frac{1 + G\gamma}{4\pi} R \int\_0^{2\pi} K(\theta) \sqrt{\beta\_\text{\textchi}(\theta)} \frac{\varepsilon\_\text{\textchi}}{\pi} e^{\pm j \int\_0^{\imath(\theta)} \frac{ds}{\beta\_\text{\textquotedblleft}}} \,\_e j G \gamma \alpha(\theta)\_\text{d} d\theta$$

In the thin-lens approximation, take *(θ )Qpole* = *Li/R* the orbital extent of quadrupole i located at *si* = *s(θ* = *θi)*, the integral & simplifies to a discrete sum over the quadrupoles. Note *(KL)i* the integrated quadrupole strength, *βy,i* = *βy(θi)*, *αi* the cumulated orbit deviation at quadrupole i, the resonance strength then writes

$$
\epsilon\_n^{\text{intr}} \approx \frac{1 + G\gamma}{4\pi} \sum\_{\text{Qpoles}} (KL)\_l \sqrt{\beta\_{\text{y},l} \frac{\varepsilon\_{\text{y}}}{\pi}} e^{j(G\gamma a\_l \pm \varphi\_l)} \tag{2.34}
$$

with *ϕi* <sup>=</sup> *s(θi)* 0 *ds βy* the vertical betatron phase advance from the origin. Distinguishing the real and imaginary components, the strength of the harmonics in the thin-lens approximation can then be written

$$\left\{ \begin{matrix} \mathcal{R}e(\epsilon\_n^{\mathrm{int}^{\pm}}) \\ \mathcal{I}m(\epsilon\_n^{\mathrm{int}^{\pm}}) \end{matrix} \right\} = \frac{1 + G\gamma\_n}{4\pi} \sum\_{\mathrm{Qpoles}} \begin{Bmatrix} \cos(G\gamma\_n \alpha\_l \pm \varphi\_l) \\ \sin(G\gamma\_n \alpha\_l \pm \varphi\_l) \end{Bmatrix} (KL)\_l \sqrt{\beta\_{\mathrm{y},l} \frac{\varepsilon\_{\mathrm{y}}}{\pi}} \qquad (2.35)$$

Note:

	- systematic resonances: n = pM, fields are M-periodic, M = number of cells or super-cells in the ring—note that these resonances excited in the ideal machine are all the more spaced when the number of cells is greater;
	- random resonances: n can take any value, field perturbations are 1-turn periodic—as would result for instance from loss of 2*π <sup>M</sup>* periodicity due to defects.

### **Amplification Near a Half-Integer Tune**

Equation 2.34 shows that intr *n* <sup>±</sup> is proportional to *K*)*βy*, thus the strength of integer resonances is amplified near Floquet resonances, namely, 2*νy* ≈integer. Indeed, pose

$$c\_n = -\frac{\nu\_\text{y}^2}{\pi} \oint \rho\_\text{y}^2 \,\delta K \, e^{-j \, n \, \varphi\_\text{y}} \, d\varphi\_\text{y}$$

with *δK* the focusing defect and *ϕy* <sup>=</sup> <sup>1</sup> *νy s* 0 *ds βy (s)* the betatron phase advance. It can be established that the perturbation of the betatron function satisfies

$$\frac{\Delta\beta\_{\rm y}}{\beta\_{\rm y}} = \sum\_{n=-\infty}^{+\infty} c\_n \frac{e^{j n \varphi\_{\rm y}}}{4\nu\_{\rm y}^2 - n^2} \tag{2.36}$$

### **Example: Linear Intrinsic Resonances in BNL AGS Booster**

The AGS injector ring (AGS Booster) is described in Chap. 14 which may be referred to for details. This example is part of the resonance study and spin dynamics simulations proposed in that chapter.

Figure 2.9 displays AGS Booster intrinsic resonance spectrum (after Eq. 2.35), Fig. 2.10 displays turn-by-turn individual vertical spin component *Sy (Gγ )* of a few particles launched on the same invariant with different initial betatron phase, as observed at a fixed azimuth in the ring, and the resulting polarization , *Sy* - *(Gγ )*, an average over a few tens of particles.

### **2.3.5.3 Case of Longitudinal Perturbing Fields**

Longitudinal fields make up the field component *Bs* in the perturbation function *f (θ )* (Eq. 2.19).

The computation of the resonance strength goes as for a *Bx* transverse component (Sect. 2.3.5.2), *mutatis mutandis*, namely, replace

$$
\lambda\_\chi = (1 + G\chi) \frac{R}{\rho\_0} \qquad \text{by} \qquad \lambda\_s = -j(1 + G) \frac{R}{\rho\_0}.
$$

**Fig. 2.9** Strength of *Gγn* ± *νy* harmonics in Booster, normalized to the invariant value, |*n*|*/* )*εy /π*. Case here of 3He2<sup>+</sup> ion, G=-4.18, whereas *<sup>ν</sup>*<sup>y</sup> <sup>=</sup> <sup>4</sup>*.*82. The spectrum includes random resonances (excited with subliminal loss of the 6-periodicity of the ring). Major lines are systematic resonances, at G*γ* = 6 × integer ± *νy* : |*Gγ* | = 0 + *νy ,* 12 − *νy ,* 6 + *νy ,* 18 − *νy*

and replace

$$K = K\_{\perp} = \frac{1}{B\_0 \rho\_0} \frac{\partial B\_{\text{y}}(\theta)}{\partial x} \qquad \text{by} \qquad K\_{\parallel} = \frac{B\_s(\theta)}{B\_0 \rho\_0}$$

Consider for instance a solenoid, located at azimuth *s* = *RθS*, length *L*, field

$$B\_s(\theta) = \delta(\theta - \theta\_S) B\_s \Delta \theta = \delta(\theta - \theta\_S) \frac{B\_s L}{R}$$

Assuming orbit aligned on the axis (no effect of radial fields at solenoid ends) the perturbation function (Eq. 2.19) reduces to

$$f(\theta) = -S\_{\circ}e^{-j\alpha}\lambda\_{s}\frac{B\_{s}}{B\_{0}}\quad\left[\text{with }\lambda\_{s} = -j(1+G)\frac{R}{\rho\_{0}}\right]$$

The strength *n* of the integer depolarizing resonances *Gγn* which this field excites is given by (this is readily obtained by substituting *λs* to *λx* and *KL* to *KL* × *y*co

**Fig. 2.10** Thin markers: individual turn-by-turn *Sy (Gγ )*; different initial betatron phases *ϕy (θ* = 0*)* result in distinct trajectories causing different torque history across resonances. Thick markers: resulting turn-by-turn average , *Sy* - *(Gγ )*

in Eq. 2.29)

$$\begin{Bmatrix} \mathcal{R}e(\epsilon\_n) \\ \Im m(\epsilon\_n) \end{Bmatrix} = -\frac{1+G}{2\pi} \begin{Bmatrix} \cos G\gamma\_n\alpha\_S \\ \sin G\gamma\_n\alpha\_S \end{Bmatrix} K\_{\parallel}L \tag{2.37}$$

with *αS* the cumulated orbit deviation at location *θS* of the solenoid. Its modulus can be written

$$|\epsilon\_n| = \left|\frac{1+G}{2\pi}K\_{\parallel}L\right| = \left|\frac{1+G}{2\pi}\frac{B\_3L}{B\_0\rho\_0}\right|\tag{2.38}$$

All spins are affected in the same amount, regardless of closed orbit or betatron motion.

The resonance strength may also be expressed in terms of the spin rotation angle, *φ*sp, as follows. The latter can be derived from Eq. 2.8, retaining the sole longitudinal component, namely

$$\frac{d\mathbf{S}}{dt} = \mathbf{S} \times \mathbf{\Omega} = \frac{q}{\gamma m} \mathbf{S} \times (1 + G) \,\mathbf{B} \,\|$$

With |**B**| = *Bs*, = || and *B*0*ρ*<sup>0</sup> = *γ mv/q* the spin rotation over the solenoid extent satisfies

$$\phi\_{\rm sp} = \int \Omega \, dt = (1+G)\frac{B\_s}{B\_0\rho\_0} \int \upsilon \, dt = (1+G)\frac{B\_sL}{B\_0\rho\_0}.$$

Substituting in Eq. 2.38 yields

$$|\epsilon\_n| = \frac{\phi\_{\rm sp}}{2\pi} \tag{2.39}$$

Additional calculations of resonance strength in various field configurations are proposed in Exercise 4–6 (Sect. 2.4), including, (1) case of a longitudinal axis spin rotator; (2) superimposing orbit distortion and spin rotator; (3) strength of coupling resonances.

# *2.3.6 Resonance Crossing. Froissart-Stora Formula*

During acceleration, as |*Gγ* | increases, depolarizing resonances are crossed, possibly in great number (Figs. 2.8 and 2.10). These resonances are in a general manner effective, due to the presence of orbit defects, and due to betatron motion. They are an obstacle to the acceleration of polarized beams to high energy in circular accelerators. This section addresses the depolarizing effect of resonance crossing.

First, re-write the differential equation for *dC dθ* in a convenient form:

– introduce *δn* = *Gγ* − *Gγn* = distance to the resonance

– note *n* the resonance strength (*n* = imp *<sup>n</sup> ,* intr *<sup>n</sup>* , ...). With these notations the differential equation for *C(θ )* in the case of an isolated resonance writes (after Eqs. 2.27 and 2.33)

$$-\frac{1}{S\_{\text{y}}} \frac{dC}{d\theta} = \begin{array}{c} \stackrel{\text{distance to resonance}}{\downarrow} \\ \epsilon\_n \\ \uparrow \\ \text{res. strength} \end{array} $$

Substituting *Sy* <sup>=</sup> ) 1 − |*C*| <sup>2</sup> (Eq. 2.25) results in *dC/dθ* differential equation under the form

$$-\frac{1}{\sqrt{1-|C|^2}}\frac{dC}{d\theta} = \epsilon\_n \, e^{j\delta\_n\theta} \tag{2.40}$$

Accelerating through a resonance, *γ* varies: *γ* ≡ *γ (θ )*. This requires changing *δnθ* <sup>≡</sup> *(Gγ* <sup>−</sup> *Gγn)θ* to *<sup>θ</sup>* <sup>0</sup> *(Gγ* − *Gγn)dθ*. Introduce the crossing speed,

$$a = \frac{d}{d\theta}(G\gamma - G\gamma\_n) = \begin{bmatrix} G\frac{d\mathcal{V}}{d\theta} & \text{imperfection resonance} \\ G\frac{d\mathcal{V}}{d\theta} \pm \frac{d\upsilon\_\mathcal{V}}{d\theta} & \text{intrinsic resonance} \end{bmatrix} \tag{2.41}$$

Note that a possible variation of the betatron tune contributes to the crossing speed ("tune jump" technique to preserve polarization, see Chap. 5), consider constant vertical tune, here. Assume constant acceleration rate, this gives

$$G\gamma - G\gamma\_n = a\theta \qquad \text{and} \qquad \int (G\gamma - G\gamma\_n)d\theta = \frac{a\theta^2}{2}$$

thus

$$-\frac{1}{\sqrt{1-|C|^2}}\frac{dC}{d\theta} = \epsilon\_n \, e^{\int \frac{d\theta^2}{2}} \quad (1) \tag{2.42}$$

Now,


$$-\frac{d}{d\theta}\left(\sin\varphi\ e^{-j\ \psi}\right) = |\epsilon\_n|\ e^{j a \frac{\theta^2}{2}}\ e^{j \operatorname{Arg}\epsilon\_n}\cos\varphi$$

Finally, pose *φ* = *ψ* − Arg *n*, to get

$$\frac{d}{d\theta} \left( \sin \varphi \, e^{-j\int \phi} \right) = -|\epsilon\_n| \, e^{j a \frac{\theta^2}{2}} \cos \varphi \tag{2.43}$$

This is the differential equation which Froissart and Stora established, in 1959, in the context of plans for polarized ion beam acceleration in the Saturne synchrotron [10]. Given the present hypothesis of an isolated resonance, integration is over *θ* : −∞ → +∞. Froissart and Stora solved it by a quantum mechanical approach where the equation to solve is linear, establishing that

$$2\cos\left[\varphi(+\infty) - \varphi(-\infty)\right] = 2\left.e^{-\frac{\pi}{2}}\frac{|\epsilon\_n|^2}{a} - 1\right|$$

a result commonly used under the form

$$\frac{P\_{\text{final}}}{P\_{\text{initial}}} = 2 \, e^{-\frac{\pi}{2}} \frac{|\epsilon\_n|^2}{a} \, - \, 1 \tag{2.44}$$

with *P*initial and *P*final the beam polarization (average of spin states over particle ensemble) respectively far upstream and far downstream of an isolated resonance.

Figure 2.10 is a typical illustration of this depolarizing effect upon crossing of isolated resonances; each resonance in that series of four can be considered isolated as the distance to its neighbors is much greater than the width of the resonance (the width of a resonance is defined in Sect. 2.3.8).

Equation 2.44 shows that in the presence of a particular configuration of perturbing fields (which determines the resonance strength |*n*|), the crossing speed *a* remains the main parameter. Three resonance crossing regimes can be distinguished:


Preserving polarization requires one of the first two regimes, i.e., adiabatic crossing resulting in spin flip (at 99% for instance), or fast crossing resulting in marginal loss (1% for instance). Practical techniques to achieve that at discussed in Chap. 5.

### **Resonance Crossing Speed**

• Case of constant tune *dνy dt* <sup>=</sup> <sup>0</sup> : *<sup>a</sup>* <sup>≡</sup> *d(Gγ* <sup>−</sup> *Gγn) dθ* <sup>=</sup> *<sup>G</sup>dγ dθ* is defined with respect to the azimuth variable *θ*. It is in that manner close to constant.

$$\frac{d\boldsymbol{\chi}}{d\theta} = \frac{\Delta\boldsymbol{\chi}}{2\pi} = \frac{1}{2\pi} \frac{\Delta W}{E\_0} \qquad \text{with} \begin{cases} \Delta W \text{ the energy gain per turn,} \\ E\_0 \text{ the rest energy of the particle.} \end{cases}$$

$$p = q \, B\_{\aleph\_0} \rho\_0 \quad \Rightarrow \frac{dp}{dt} = q \, \dot{B}\_{\aleph\_0} \rho\_0 = F \qquad \left(\dot{B} = \frac{dB}{dt}\right)$$

work of F ⇒ *W* = *F* × 2*πR* = 2*πR qB*˙*y*0*ρ*<sup>0</sup>

(continued)

thus

$$\frac{d\boldsymbol{\gamma}}{d\theta} = \frac{1}{2\pi} \frac{2\pi \, R \, q \, \dot{B}\_{\text{y}0} \rho\_0}{E\_0} = \frac{R \, \rho\_0 \, \dot{B}}{E\_0/q} \qquad \text{and} \quad a = G \frac{d\boldsymbol{\gamma}}{d\theta} = G \frac{R \, \rho\_0}{E\_0/q} \, \dot{B}$$

• Case *dνy dt* = 0, "tune jump":

$$\frac{d(G\boldsymbol{\chi} - G\boldsymbol{\chi}\_n)}{d\theta} = \frac{d\left(G\boldsymbol{\chi} - (\mathbf{n} \pm \boldsymbol{\nu}\_\circ)\right)}{d\theta}$$

and

$$a = G\frac{d\boldsymbol{\eta}}{d\theta} \pm \frac{d\boldsymbol{\upsilon\_{\rm y}}}{d\theta}$$

# *2.3.7 Spin Motion Through a Weak Resonance*

In the case of a weak resonance, the spin differential equation of motion (Eq. 2.23, with Eq. 2.24) finds an analytical solution *Sy (θ )* [3]. This is an interesting case to explore at this allows an access to the details of spin motion, turn by turn through a resonance.

In the differential equation of motion through a resonance (Eq. 2.43) pose cos *ϕ* ≈ 1, i.e., angle to vertical axis left essentially unchanged by the crossing, this yields

$$\frac{d}{d\theta} \left( \sin \varphi \, e^{-j\int \phi} \right) = -|\epsilon\_n| \, e^{j\frac{a\theta^2}{2}} \tag{2.45}$$

Pose *y* = + *a π θ*; in *d* sin *ϕ e*−*j φ* = −+*<sup>π</sup> <sup>a</sup>* <sup>|</sup>*n*<sup>|</sup> *<sup>e</sup><sup>j</sup> πy*<sup>2</sup> 2 *dy*, identify real and imaginary parts, this yields

$$\begin{cases} \sin\varphi\cos\phi = -\sqrt{\frac{\pi}{a}} \left| \epsilon\_n \right| \int\_{-\infty}^{\chi} \cos\frac{\pi\chi^2}{2} \,d\chi\\ \sin\varphi\sin\phi = +\sqrt{\frac{\pi}{a}} \left| \epsilon\_n \right| \int\_{-\infty}^{\chi} \sin\frac{\pi\chi^2}{2} \,d\chi \end{cases}$$

and

$$\sin^2 \varphi = \frac{\pi}{a} |\epsilon\_n|^2 \left[ \left( \int\_{-\infty}^{\chi} \cos \frac{\pi \chi^2}{2} \, d\chi \right)^2 + \left( \int\_{-\infty}^{\chi} \sin \frac{\pi \chi^2}{2} \, d\chi \right)^2 \right] \tag{2.46}$$
 
$$\text{Frasnel intervals}$$

Fresnel integrals

### **A Check of the Weak Resonance Approximation**

Consider full crossing: *y* → ∞. Integrate: <sup>∞</sup> −∞ cos *πy*<sup>2</sup> <sup>2</sup> *dy* = 1 and ∞ −∞ sin *πy*<sup>2</sup> <sup>2</sup> *dy* = 1, so that

$$\begin{aligned} \sin^2 \varphi &= \frac{2\pi}{a} \left| \epsilon\_n \right|^2 \\ \text{thus } \sqrt{1 - \sin^2 \varphi} = \cos \varphi &\approx 1 - \frac{a}{a} \left| \epsilon\_n \right|^2 \end{aligned}$$

a result in accord with the limited development of Froissart-Stora formula, namely (Eq. 2.44 with *ϕ* = *ϕ* − 0),

$$\cos\varphi = 2\ e^{-\frac{\pi}{2}} \frac{|\epsilon\_n|^2}{a} - 1 \approx 2\left(1 - \frac{\pi}{2} \frac{|\epsilon\_n|^2}{a}\right) - 1 = 1 - \frac{\pi}{a} |\epsilon\_n|^2$$

Back to Eq. 2.46: introduce the Fresnel integrals

$$C(\mathbf{x}) = \int\_0^\chi \cos \frac{\pi t^2}{2} \, dt; \qquad S(\mathbf{x}) = \int\_0^\chi \sin \frac{\pi t^2}{2} \, dt$$

and use

$$\int\_{-\infty}^{0} \cos \frac{\pi t^2}{2} \, dt = \int\_{0}^{\infty} \cos \frac{\pi t^2}{2} \, dt = 0.5; \int\_{-\infty}^{0} \sin \frac{\pi t^2}{2} \, dt = \int\_{0}^{\infty} \sin \frac{\pi t^2}{2} \, dt = 0.5$$

This results in

$$\begin{aligned} \text{For } \mathbf{y} > 0 \text{ i.e., } \theta > 0 & \xrightarrow{\text{downstream of the resonance}} \underbrace{\text{downstream of the resonance}}\_{\begin{subarray}{c} \text{downstream of the resonance} \\ \text{upstream } \mathbf{y} = \pm \alpha \end{subarray}} \underbrace{|\epsilon\_n|^2 \left[ (0.\mathbf{S} + \mathbf{C}(\mathbf{y}))^2 + (0.\mathbf{S} + \mathbf{S}(\mathbf{y}))^2 \right]}\_{\begin{subarray}{c} \text{downstream of the momentum} \\ \text{upstream of the resonance} \end{subarray}} \end{aligned} \tag{2.47}$$
 
$$\begin{aligned} \text{For } \mathbf{y} < 0 & \text{ i.e., } \theta < 0 \\ \text{upstream of the resonance} & \quad \boxed{\text{upstream of the resonance}} \end{aligned} \tag{2.47}$$

with the origin of the orbital angle *θ* at the resonance. A graph of the resulting *Sy* <sup>=</sup> cos *<sup>ϕ</sup>* <sup>=</sup> ) <sup>1</sup> <sup>−</sup> sin<sup>2</sup> *<sup>ϕ</sup>* is displayed in Fig. 2.11.

**Fig. 2.11** A graph of *Sy (θ )* <sup>=</sup> ) <sup>1</sup> <sup>−</sup> sin2 *ϕ(θ )* (solid curve; after Eq. 2.47). Numerical conditions are taken from AGS Booster, *Gγn* = *νy* resonance—see Sect. 14.1.1.9, markers are from turn-byturn tracking simulations implemented there

# *2.3.8 Stationary Spin Precession; Width of a Resonance*

If particle energy is fixed, so is the distance to the resonance

$$
\delta\_n = G\gamma - G\gamma\_n = constant.
$$

Start from the spin motion equation *sπ (θ )* = *C(θ ) sπ,*unpert*.(θ )* (Eq. 2.23) with

<sup>−</sup> <sup>1</sup> ) 1 − |*C*| 2 *dC dθ* <sup>=</sup> *n <sup>e</sup>j δn <sup>θ</sup>* (Eq. 2.40).

Look for a stationary solution for *C(θ )*: *C(θ )* = |*sπ* <sup>|</sup> *<sup>e</sup>j δn <sup>θ</sup>* . it comes

$$-\frac{1}{\sqrt{1-|\mathbf{s}\_{\pi}|^{2}}}\left[\frac{d|\mathbf{s}\_{\pi}|}{d\theta}+j\,\delta\_{n}\,|\mathbf{s}\_{\pi}|\right]e^{j\int \delta\_{n}\,\theta}=\epsilon\_{n}\,e^{j\delta\_{n}\,\theta}$$

Look for a solution such that <sup>|</sup>*sπ* | =constant, thus <sup>−</sup> *j δn* <sup>|</sup>*sπ* <sup>|</sup> ) <sup>1</sup> − |*sπ* <sup>|</sup><sup>2</sup> <sup>=</sup> *n*, so yielding

$$|s\_{\pi}|^2 = \frac{1}{1 + \left(\frac{\delta\_n}{|\epsilon\_n|}\right)^2} \tag{2.48}$$

**Fig. 2.12** Polarization as a function of normalized distance *δn/*|*n*| to the resonance (Eq. 2.49). |*n*| is the resonance width

The physical quantity of interest is the polarization , *Sy* - <sup>=</sup> *<sup>n</sup>*<sup>+</sup> <sup>−</sup> *<sup>n</sup>*<sup>−</sup> *n*<sup>+</sup> + *n*<sup>−</sup> *, n*±: the number of particles with spin ± 1 2 . From Eq. 2.48 it comes

$$
\langle \mathcal{S}\_{\mathcal{Y}} \rangle = \sqrt{1 - |s\_{\pi}|^2} = \frac{\delta\_n}{\sqrt{\epsilon\_n^2 + \delta\_n^2}} \tag{2.49}
$$

and reciprocally

$$\frac{\delta\_n}{\left|\epsilon\_n\right|} = \frac{\left\langle \mathbf{S}\_\mathbf{y} \right\rangle}{\sqrt{1 - \left\langle \mathbf{S}\_\mathbf{y} \right\rangle^2}}$$


The dependence of polarization upon distance to the resonance is displayed in Fig. 2.12. It is for instance 70.7%, 95% and 99% at distances respectively *δn* = |*n*|, 3 |*n*| and 7 |*n*|.

# *2.3.9 Non-linear Resonances*

Sextupoles excite non-linear depolarizing resonances [4]. These are driven by betatron motion, their effect on spin depends on both horizontal and vertical particle invariants, *εx* and *εy* (their effect on beam polarization depends on horizontal and vertical beam emittance): the greater *εx,y*, the greater the sextupole perturbative field

$$B\_{\mathbf{x}} = H \ge \mathbf{y} = 2H \left( B\_0 \rho\_0 \right) \ge \mathbf{y} \tag{2.50}$$

Their location depends on both horizontal and vertical tunes:

$$G\boldsymbol{\gamma}\_n = n \pm \boldsymbol{\nu}\_{\boldsymbol{\chi}} \pm \boldsymbol{\nu}\_{\boldsymbol{\chi}}$$

The perturbation function (Eq. 2.19) reduces to

$$f(\theta) = -S\_{\text{y}}e^{-j\alpha}\lambda\_{\text{x}}\frac{B\_{\text{x}}}{B\_{0}} = -2S\_{\text{y}}e^{-j\alpha}\lambda\_{\text{x}}H(\theta)\rho\_{0} \ge \text{ [with } \lambda\_{\text{x}} = (\text{l} + G\gamma)\frac{R}{\rho\_{0}}]$$

so that (Eq. 2.26)

$$-\frac{1}{S\_{\text{y}}}\frac{dC}{d\theta} = 2\lambda\_{\text{x}}\rho\_{0}H(\theta) \ge (\theta) \text{ y}(\theta) \, e^{\text{j}\,G\,\gamma\alpha} \tag{2.51}$$

Substituting *x y(θ )* = *Fx (θ ) ej (νxθ* <sup>+</sup> *ϕx)* <sup>+</sup> *CC Fy(θ ) ej (νyθ* <sup>+</sup> *ϕy)* <sup>+</sup> *CC* wherein *Fx y* = 1 2 /0001*βx y εx y π e j* ⎛ ⎜ ⎝ *s* 0 *ds β x y* − *νx y θ* ⎞ ⎟ ⎠ , yields

$$\mathbf{x} \times \mathbf{y} = \frac{1}{4} \sqrt{\beta\_x \frac{\varepsilon\_x}{\pi}} \sqrt{\beta\_y \frac{\varepsilon\_y}{\pi}} \left[ e^{j\left(\int\_0^s \frac{ds}{\beta\_x} + \int\_0^s \frac{ds}{\beta\_\gamma} - \nu\_x \theta - \nu\_\mathbf{y} \theta\right)} e^j \left(\nu\_x \theta + \nu\_\mathbf{y} \theta + \varphi\_x + \varphi\_\mathbf{y}\right)\_+ + CC \right] \tag{2.52}$$

$$+ e^j \left( \int\_0^s \frac{ds}{\beta\_x} - \int\_0^s \frac{ds}{\beta\_\gamma} - \nu\_x \theta + \nu\_\mathbf{y} \theta \right)\_e j\left(\nu\_x \theta - \nu\_\mathbf{y} \theta + \varphi\_x - \varphi\_\mathbf{y}\right)\_+ + CC \right] \tag{2.52}$$

Consider for instance the resonance *Gγn* = *n* − *νx* − *νy* , which stems from the term

$$-\frac{1}{S\_{\text{y}}}\frac{dC}{d\theta} = \frac{1+G\chi}{2}H(\theta)R\times\tag{2.53}$$

$$\sqrt{\beta\_{\mathbf{x}}\frac{\varepsilon\_{\mathbf{x}}}{\pi}}\sqrt{\beta\_{\mathbf{y}}\frac{\varepsilon\_{\mathbf{y}}}{\pi}}e^{j\left(\int\_{0}^{\mathbf{s}}\frac{ds}{\beta\_{\mathbf{x}}}+\int\_{0}^{\mathbf{s}}\frac{ds}{\beta\_{\mathbf{y}}}-\nu\_{\mathbf{x}}\theta-\nu\_{\mathbf{y}}\theta\right)}e^{j\left(\nu\_{\mathbf{x}}\theta+\nu\_{\mathbf{y}}\theta+\varphi\_{\mathbf{x}}+\varphi\_{\mathbf{y}}\right)}e^{j\left(G\chi\alpha\right)}$$

In Eq. 2.51 re-write the factor *<sup>e</sup>jGγ α* <sup>→</sup> *<sup>e</sup>*−*jGγ (θ* <sup>−</sup> *α) <sup>e</sup>jGγ θ* , re-arrange, to get

$$-\frac{1}{S\_{\rm y}}\frac{dC}{d\theta} = \frac{1+G\chi}{2}H(\theta)R \times \tag{2.54}$$

$$\underbrace{\sqrt{\beta\_{\mathbf{x}}\frac{\mathbf{c}\_{\mathbf{x}}}{\pi}\sqrt{\beta\_{\mathbf{y}}\frac{\mathbf{c}\_{\mathbf{y}}}{\pi}}}\,\boldsymbol{j}\left(\int\_{0}^{\mathbf{s}}\frac{ds}{\overline{\rho}\_{\mathbf{x}}}+\int\_{0}^{\mathbf{s}}\frac{ds}{\overline{\rho}\_{\mathbf{y}}}-\boldsymbol{\nu}\_{\mathbf{x}}\theta-\boldsymbol{\nu}\_{\mathbf{y}}\theta-G\boldsymbol{\chi}(\theta-\mathbf{a})\right)}\_{\text{l-t}\text{-turn resistivity}}\,\boldsymbol{j}\left(\boldsymbol{\nu}\_{\mathbf{x}}\theta+\boldsymbol{\nu}\_{\mathbf{y}}\theta+\boldsymbol{\varphi}\_{\mathbf{x}}+\boldsymbol{\varphi}\_{\mathbf{y}}\right)}$$

1-turn periodic

Expand the 1-turn periodic component in Eq. 2.55 in Fourier series, \* *<sup>n</sup> ne*−*j nθ* , the harmonic strength writes

$$\epsilon\_{\rm tr} = \frac{1+G\underline{\gamma}}{4\pi} R \oint H(\theta) \sqrt{\beta\_{\rm x} \frac{\varepsilon\_{\rm x}}{\pi}} \sqrt{\beta\_{\rm y} \frac{\varepsilon\_{\rm y}}{\pi}} e^{j\left(\int\_{0}^{t} \frac{ds}{\overline{\beta\_{\rm x}}} + \int\_{0}^{s} \frac{ds}{\overline{\beta\_{\gamma}}} - \nu\_{\rm x} \theta - \nu\_{\rm y} \theta - G\gamma(\theta - a)\right)}{e^{j\chi\_{\rm B}} d\theta} e^{j\theta} d\theta$$

Near the resonance *Gγ* ≈ *n* − *νx* − *νy*, thus the previous expression reduces to

$$\epsilon\_n = \frac{1+G\chi}{4\pi} R \oint H(\theta) \sqrt{\beta\_x \frac{\varepsilon\_x}{\pi}} \sqrt{\beta\_y \frac{\varepsilon\_y}{\pi}} e^{j\left(\int\_0^s \frac{ds}{\beta\_x} + \int\_0^s \frac{ds}{\beta\_y} + G\chi a\right)} d\theta$$

In the thin-lens approximation, take *(θ )Sextupole* = *Li/R* the orbital extent of lens i located at *si* = *s(θ* = *θi)*, the integral & simplifies to a discrete sum over the lenses. Note *(H L)i* the integrated sextupole strength, *βx <sup>y</sup> ,i* <sup>=</sup> *βx y (θi)*, *αi* the

cumulated orbit deviation at sextupole i, the resonance strength then writes

$$\epsilon\_{n} = \frac{1+G\chi}{4\pi} \sum\_{\text{Sextu}} (HL)\_{l} \sqrt{\beta\_{\text{x},l} \frac{\varepsilon\_{\text{x}}}{\pi}} \sqrt{\beta\_{\text{y},l} \frac{\varepsilon\_{\text{y}}}{\pi}} e^{j\left(\int\_{0}^{s\_{l}} \frac{ds}{\beta\_{\text{x},l}} + \int\_{0}^{s\_{l}} \frac{ds}{\beta\_{\text{y},l}} + jG\chi a\right)}$$

Distinguishing the real and imaginary components, the strength of the harmonics in the thin-lens approximation writes

$$\left\{ \begin{matrix} \mathcal{R}e(\epsilon\_{\hbar}) \\ \mathcal{I}m(\epsilon\_{\hbar}) \end{matrix} \right\} = \frac{1 + G\gamma}{4\pi} \sum\_{\text{Sextu}} \left\{ \begin{matrix} \cos(G\gamma\alpha\_{l} + \varphi\_{\chi,l} + \varphi\_{\chi,l}) \\ \sin(G\gamma\alpha\_{l} + \varphi\_{\chi,l} + \varphi\_{\chi,l}) \end{matrix} \right\} (HL)\_{l} \sqrt{\beta\_{\chi,l} \frac{\varepsilon\_{\chi}}{\pi}} \sqrt{\beta\_{\chi,l} \frac{\varepsilon\_{\chi}}{\pi}} \tag{2.55}$$

with *ϕx <sup>y</sup> ,i* <sup>=</sup> *s(θi)* 0 *ds βx y* the betatron phase advance from the origin.

# **2.4 Homework**

In Exercises 1 to 3, theoretical elements introduced in the course are used to build ad hoc elementary, short, numerical simulations aimed at producing the numerical results expected from theory. These exercises also allow additional, "hands-on", insight in the arcanes of spin motion theory, spin motion in cyclic accelerators and the effects of such parameters as energy, perturbing fields, betatron motion frequency and amplitude. In order to complete and understand these simulations and their input data, it is necessary to have at hand the manual of the computer code used as this is where all useful explanations regarding optical components resorted to and their keywords, input and output data files and their content, etc., will be found. Note that any code with capabilities of spin tracking through arbitrary **E** and **B** fields, as necessitated in these three exercises, can be utilized; the code resorted to here and its manual can be downloaded from sourceforge [17] details regarding its utilization are given in due place in the exercises concerned, 1 to 3.

Exercises 4 to 6 are theoretical questions, only requiring paper and pencil.

# • **? Exercise 1: Low Energy Spin Rotator**

This exercise serves two purposes: (1) moving a spin through a combined electric × magnetic field device and checking simulation outcomes against theoretical expectations, on the one hand, but also, (2) getting a taste of numerical simulation of spin motion through accelerator optical components.

Prior to injection into downstream stages, a linac for instance, spins generally need be set normal to the beam propagation axis, from their longitudinal orientation at the source. A Wien filter may be used for that: this is the case for instance in CEBAF electron injector (Fig. 8.4, p. 204) a similar device is under study for the EIC [18].

### **Working Hypotheses**

Refer to the reference frame in Fig. 2.13,



$$\mathbf{v}' = \mathbf{v} \times \mathbf{B} / B\rho \quad \text{and} \quad \mathbf{S}' = \mathbf{S} \times \mathbf{\Omega} / B\rho$$

express the spin precession under the effect of this **E***,***B** crossed fields device, in terms of distance *s, BZ, EY , v/c*, particle rigidity *Bρ* and Wien filter length *L*.


WFSegment.dat computes particle and spin motion through the 50 cm Wien filter segment, by stepwise numerical integration, and produces a graph of spin motion over the 50 cm; the simulation material includes the corresponding gnuplot script: gnuplot\_spin.gnu,its content clarifies which computational output data, from which output file, are concerned in the present question.

4.a It comes out of a preliminary run of WFSegment.dat (following the README file instructions) that the Wien filter *EY* and *BZ* field values assigned in WFSegment.inc are not accurate: electron final transverse coordinates are not zero, its spin rotation is not 30◦.

Confirm this by running the simulation file as is and providing graphs of the electron trajectory and spin precession over the 50 cm segment. Find in the result listing the (present, incorrect) values of the trajectory coordinates and spin precession angle at the exit of this loosely tuned Wien filter.

4.b In WFSegment.inc, update *EY* and *BZ* to their theoretical values, as per question 3.

Provide the new graphs of the electron trajectory, it should be straight along the X-axis, and of spin motion over the 150 cm Wien filter (as in Fig. 2.14), it should end up normal to the X-axis after a 150 cm path.

4.c Using the theoretical *EY* and *BZ* values, compute the dependence of the final electron coordinates (position and angle) and spin precession angle, on the integration step size. Provide a graph. Explain what you observe.

Hint: use the following form of REBELOTE do-loop command to repeat tracking through WIENFILT for a series of integration step size values:

'REBELOTE' 100 0.1 0 1 ! Repeat the previous sequence, 100 times, and prior to each repeat, 1 ! change value of one parameter, WIENFILT 80 0.01:10. ! namely, number 80 (integration step size) in WIENFILT.

Add FAISTORE[FNAME=zgoubi.fai] before REBELOTE, to store particle data at each pass.

**Fig. 2.14** Spin precession along the X axis, from longitudinal at s = 0 to **E** at s = 1.5 m

What is the maximum step size for a relative error on spin precession below 10−4?

5. Add *λE* ≈ *λB* ≈ 5 ∼ 7 cm long *E* and *B* field fall-off at both ends of the Wien filter 50 cm segment. Ensuring zero particle coordinates at exit and 30◦ spin precession now requires adjusting the fields.

A fitting procedure allows computing the matched values of *EY* and *BZ*; their relative difference to the hard edge theoretical values is expected to be small.

Provide graphs of the electron trajectory, and of *EY (X)* and *BZ(X)*.

6. The E and B fringe fields in a Wien filter actually have different extents. This causes an offset of particle trajectory.

Keep the electric field entrance and exit fall-offs *λE* = 5 cm fixed, and vary the magnetic field fringe length in the range 3 ≤ *λB* ≤ 7 cm; re-match the field values to recover exit coordinates equal to zero together with 30◦ spin precession angle.

Reproduce Fig. 2.15: the series of trajectories, Y(X), obtained for this series of values of the ratio *λE/λB*.

Provide a graph of the dependence on the ratio *λE/λB*, of the relative variation of *EY* and *BZ*.

Hint: use the following form of REBELOTE do-loop command, placed after FIT, to repeat the fitting procedure for a series of *λE/λB* values:

```
'REBELOTE'
37 0.1 0 1 ! NPASS is of the form int*(7[cm]-3[cm])+1 to allow for lambdaB/lambdaE=1.
2
WIENFILT 22 3.:7. ! vary lambda_B at entrance EFB from 3 to 7 cm.
WIENFILT 52 3.:7. ! vary lambda_B at exit EFB from 3 to 7 cm.
```
**Fig. 2.15** A scan of the on-momentum orbit across the Wien filter, with varying fringe field extent ratio *λE/λB*. The orbit is zero at entrance by hypothesis, and zeroed at the exit

### **Solution**

A detailed solution of this exercise is given in [20]. All computer code input files for questions 4–6 can be found in the USPAS Spin Class repository [20], where simulation result files (result listings, gnuplot scripts and graphs, etc.) can be found as well.

# • **? Exercise 2: Synchronized Torque**

This exercise resorts to theory in order to build spin motion simulations; it includes the introduction of a local spin rotator and the investigation of subsequent resonant behavior (the spin rotator torque superposes to the uniform field, possibly synchronized with the betatron motion). It requires simulating orbital motion of a single proton in a uniform field (the field of a classical cyclotron, typically), on a constant radius orbit, thus at constant energy.

Simulation data files can be based on the following two, found in [20]: synchSpinTorque.INC.dat which computes the circular motion of a few protons in a uniform 5 kG field, and their spin motion, and the optical sequence file 60degSector.inc which is called by the former; both include comments, for guidance.

For each question, explain what is expected from theory, and compare with simulation outcomes. As a guidance, Fig. 2.16 gives an idea of expected outcomes.

1. Find the closed orbit for a 200 keV proton in that 5 kG uniform field.

**Fig. 2.16** Left: vertical spin component as a function of orbital angle, for various *Gγ* values. Middle: spin motion on a sphere, some non-integer *Gγ* value. Right: spin motion on a sphere, integer *Gγ* ; every turn the spin jumps by an angle equal to the spin rotator angle, 10◦ here

	- 2.a Plot the vertical spin component as a function of orbital angle, over a few tens of turns.
	- 2.b Plot the projection of the spin vector motion in the horizontal plane.
	- 2.c Plot the projection of the spin vector motion on a sphere.
	- 2.d Compute the spin closed orbit vector at the origin of the optical sequence, and the spin tune.

### **Solution**

A detailed solution of this exercise is given in [19]. All computer code input files can be found in the USPAS Spin Class repository [20], where simulation result files (result listings, gnuplot scripts and graphs, etc.) can be found as well.

# • **? Exercise 3: Periodic Spin Precession in a Ring**

This exercise is a follow up of the previous one, "Synchronized Torque". Orbital motion of a single proton in a uniform field, on a constant radius orbit is considered again, here. The periodic solution of the spin equation of motion in a cyclic accelerator is investigated, it is known as the "stable spin precession direction", or "spin closed orbit".

**Fig. 2.17** Left: spin components as a function of orbital angle, *Gγ* = 2*.*5. Right: projection of spin motion in the bend plane, *Gγ* = 2

Consider the motion of the spin of a particle on a closed orbit around the ring, in this configuration, a stable spin precession direction can be found, which closes on itself after a turn.

1. Find the closed spin precession solution at the location of the longitudinal kick (SPINR), in the different energy cases addressed in Exercise 2.2.

Hint: A matching procedure can be used, with constraint equal initial and final spin coordinates.


### **Solution**

A detailed solution of this exercise is given in [19]. All computer code input files can be found in the USPAS Spin Class repository [20], where simulation result files (result listings, gnuplot scripts and graphs, etc.) can be found as well.

# • **? Exercise 4: Strength of a Longitudinal Axis Spin Rotator**

Show that if a device (known as a snake, see "Rotators and Snakes", Chap. 4) is introduced which causes a spin rotation of angle *φ*snake around the longitudinal axis, the strength of the integer resonance it induces is <sup>|</sup>snake *<sup>n</sup>* | = *φ*snake */*2*π*.

### **Solution**

The question is treated in Sect. 2.3.5.3.

# • **? Exercise 5: Orbit Distortion and Spin Rotator, Superposed**

Consider a lattice featuring a vertical orbit distortion which excites imperfection resonances with strength imp. Assume that lattice includes a longitudinal spin rotator with resonance strength long*.* .

Express the imperfection resonance strength resulting from the superposition of these two perturbative effects. Write the Froissart and Stora formula in that case.

(Hint: consider the derivation of Eq. 2.29).

### **Solution**

The following is a guidance, detailed calculation is left to the reader.

Consider the differential equation for *C* in the case of linear resonances (Eq. 2.26): two perturbative terms have to be retained, namely, *Bx* arising from a non-zero vertical closed orbit, and *Bs* arising from a longitudinal spin rotator. Thus, Eq. 2.27 features two series, one for imp, one for long*.* , thus the complex strength is the sum of the two contributions,

$$
\epsilon = \epsilon^{\rm imp} + \epsilon^{\rm long.}
$$

The Froissart and Stora formula (Eq. 2.44) in that case writes

$$\frac{P\_{\text{final}}}{P\_{\text{initial}}} = 2 \, e^{-\frac{\pi}{2}} \frac{|\epsilon^{\text{imp}} + \epsilon^{\text{long}}|^2}{a} - 1$$

# • **? Exercise 6: Strength of Coupling Resonances**

Calculate the resonance strength series in the thin-lens approximation (i.e., in a similar form to Eq. 2.35) in the case of skew quadrupole fields.

### **Solution**

Skew quadrupoles, or quadrupole roll defects, cause horizontal field components of the form

$$B\_{\mathfrak{x}}(\theta) = G \mathfrak{x}(\theta) = K\_{sk}(\theta) \times B\_0 \rho\_0 \times \mathfrak{x}\_{\beta}(\theta)$$

with *Ksk* the field strength. These excite resonances at all *Gγn* = *n* ± *νx* .

Considering Eq. 2.31, getting the resonance strength is a matter of substituting *<sup>K</sup>* <sup>→</sup> *Ksk* and *yβ(θ )* <sup>=</sup> *Fy (θ ) ej (νyθ* <sup>+</sup> *ϕy)* <sup>+</sup> *CC* <sup>→</sup> *xβ(θ )* <sup>=</sup> *Fx (θ ) ej (νxθ* <sup>+</sup> *ϕx)* <sup>+</sup> *CC*. Propagating these changes in Eq. 2.35 yields the coupling resonance strength

$$\begin{Bmatrix} \mathcal{R}e(\epsilon\_n^{\pm})\\\Im m(\epsilon\_n^{\pm}) \end{Bmatrix} = \frac{1 + G\gamma\_n}{4\pi} \sum\_{\text{Qpoles}} \begin{Bmatrix} \cos(G\gamma\_n \alpha\_l \pm \varphi\_l) \\\sin(G\gamma\_n \alpha\_l \pm \varphi\_l) \end{Bmatrix} (K\_{sk}L)\_l \sqrt{\beta\_{\chi,l}\frac{\varepsilon\_\chi}{\pi}}$$

with *ϕi* <sup>=</sup> *s(θi)* 0 *ds βx* the horizontal betatron phase advance from the origin.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 3 Spinor Methods**

59

**François Méot**

**Abstract** This chapter is an introduction to spinors and spinor algebra methods and their application in spin dynamics. Spinors and their manipulation are introduced, first, together with a number of properties of interest for the calculation of spin transport in special devices such as Siberian snakes, spin rotators, and in beam lines in general, and for the calculation as well of the effects of depolarizing resonances in cyclic accelerators. Practical application to spin transport follows. Spinor eigenvectors are introduced and applied to the calculation of stable spin precession direction in cyclic accelerators. Spin motion near integer and intrinsic resonances is derived using these techniques, and allows reproducing results obtained in the previous chapter.

# **3.1 Introduction**

This lecture is based on several of the founding theoretical papers and earlier lectures regarding spinor methods in spin dynamics. Publications used to prepare these notes include A. Chao's 2000 USPAS lecture [1], Courant-Ruth's 1980 BNL report [2], Montague's 1984 article [3], Tkatchenko-Niem's 1993 Saturne report, [4] and textbooks by S.Y. Lee [5] and Conte and MacKay [6].

F. Méot (-)

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Collider Accelerator, Brookhaven National Laboratory, Upton, NY, USA e-mail: fmeot@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_3

This list is not exhaustive, however it is believed to be a sound starting point for further exploration and advanced knowledge, beyond the present brief theoretical introduction to spinor methods.

# **3.2 Spinors**

In dealing with Thomas-BMT equation of spin motion for spin-½ particles in Chap. 2, spin was considered a classical quantity (by resorting to the principle of correspondence), handled under the form of a 3-vector in real space, **S** = - Ss Sx Sy (in

the reference frame defined in Fig. 2.5).

An alternate method to describe spin motion uses their spinor representation: a complex 2-vector

$$
\psi = \begin{pmatrix} \psi\_1 \\ \psi\_2 \end{pmatrix}
$$

manipulated using spinor algebra: a 2 × 2 rotation matrix algebra.

The complex components ψ<sup>1</sup> and ψ<sup>2</sup> of a spinor represent the respective probabilities of the +½ and <sup>−</sup>½ spin states (spin angular momentum <sup>S</sup> = ±h/¯ 2). The normalization condition for the spinors reads

$$|\psi|^2 \equiv \psi^\dagger \psi \equiv (\psi\_1^\*, \psi\_2^\*) \begin{pmatrix} \psi\_1 \\ \psi\_2 \end{pmatrix} = \left| \psi\_1 \right|^2 + \left| \psi\_2 \right|^2 = 1$$

Two-dimensional spinors will be addressed here, for spin ½ particles. The treatment for 3-dimensional spinors, spin 1 particles, can be found for instance in Ref. [6].

# **3.3 Pauli Matrices**

The wanting frame in this chapter is represented in Fig. 3.1.

A spinor matrix algebra has 4 basis elements:

– the identity matrix <sup>I</sup> <sup>=</sup> 1 0 0 1 , and – Pauli matrices: σx <sup>=</sup> 0 1 1 0 , σs <sup>=</sup> <sup>0</sup> <sup>−</sup><sup>i</sup> i 0 , σy <sup>=</sup>

$$\text{Lemma } \text{\textquotedblleft} \alpha\_{\overline{\lambda}} = \begin{pmatrix} 1 & 0 \end{pmatrix}, \alpha\_{\overline{s}} = \begin{pmatrix} i & 0 \end{pmatrix}, \alpha\_{\overline{\lambda}} = \begin{pmatrix} 0 & -1 \end{pmatrix}$$
 
$$\text{Indices relate to the frame axes, this is addressed below.}$$

Moving from a spinor 2-vector representation, <sup>ψ</sup> <sup>=</sup> ψ<sup>1</sup> ψ2 , to a classical 3-

 1 0  .

$$\mathbf{vector}\,\mathbf{S} = \begin{pmatrix} S\_{\chi} \\ S\_{\mathcal{S}} \\ S\_{\mathcal{Y}} \end{pmatrix}, \text{ goes as follows.}$$

**Fig. 3.1** The moving frame (Serret-Frénet frame). Note that it is left-handed, for convenience (whereas a right-handed frame was considered in Chap. 2, Fig. 2.5)

Define a 3-vector *σ* <sup>=</sup> σx σs σy , take <sup>ψ</sup>† <sup>=</sup> (ψ<sup>∗</sup> <sup>1</sup> , ψ<sup>∗</sup> <sup>2</sup> ) Hermitian conjugate of <sup>ψ</sup>,

then

$$\mathbf{S} = \begin{pmatrix} S\_{\times} \\ S\_{s} \\ S\_{\times} \end{pmatrix} \equiv \boldsymbol{\psi}^{\dagger} \boldsymbol{\sigma} \boldsymbol{\psi} = \begin{pmatrix} \boldsymbol{\psi}^{\dagger} \boldsymbol{\sigma}\_{\times} \boldsymbol{\psi} \\ \boldsymbol{\psi}^{\dagger} \boldsymbol{\sigma}\_{\times} \boldsymbol{\psi} \\ \boldsymbol{\psi}^{\dagger} \boldsymbol{\sigma}\_{\times} \boldsymbol{\psi} \end{pmatrix} = \begin{pmatrix} \boldsymbol{\psi}\_{1} \boldsymbol{\psi}\_{2}^{\*} + \boldsymbol{\psi}\_{1}^{\*} \boldsymbol{\psi}\_{2} \\ i \boldsymbol{\psi}\_{1} \boldsymbol{\psi}\_{2}^{\*} - i \boldsymbol{\psi}\_{1}^{\*} \boldsymbol{\psi}\_{2} \\ |\boldsymbol{\psi}\_{1}|^{2} - |\boldsymbol{\psi}\_{2}|^{2} \end{pmatrix} \tag{3.1}$$

Note the expected |**S**| <sup>2</sup> <sup>=</sup> <sup>S</sup><sup>2</sup> <sup>x</sup> <sup>+</sup> <sup>S</sup><sup>2</sup> <sup>s</sup> <sup>+</sup> <sup>S</sup><sup>2</sup> <sup>y</sup> <sup>=</sup> <sup>1</sup>, as comes out with some algebra.

### **Pauli Matrix Properties**

A variety of properties are resorted to in manipulating spinors, which will be used in particular in various calculations to come, as follows:

$$
\sigma\_l^\dagger = \sigma\_l \text{ (Hermitian)}; \quad \det(\sigma\_l) = -1; \quad \text{tr}(\sigma\_l) = 0; \quad \sigma\_l^\dagger \sigma\_l = \sigma\_l^2 = I \text{ (unitary)}
$$

wherein the suffix i stands for indifferently x, s or y.

$$
\sigma\_{\boldsymbol{\alpha}} \sigma\_{\boldsymbol{s}} = -\sigma\_{\boldsymbol{s}} \sigma\_{\boldsymbol{x}} = i \sigma\_{\boldsymbol{\gamma}}; \ \sigma\_{\boldsymbol{s}} \sigma\_{\boldsymbol{y}} = -\sigma\_{\boldsymbol{y}} \sigma\_{\boldsymbol{s}} = i \sigma\_{\boldsymbol{x}}; \ \sigma\_{\boldsymbol{y}} \sigma\_{\boldsymbol{x}} = -\sigma\_{\boldsymbol{x}} \sigma\_{\boldsymbol{y}} = i \sigma\_{\boldsymbol{s}}
$$

$$
\text{scalar product}: \boldsymbol{\sigma} \cdot \boldsymbol{\sigma} = \sigma^{\dagger} \cdot \boldsymbol{\sigma} = \boldsymbol{\sigma} \cdot \boldsymbol{\sigma}^{\dagger} = \sigma\_{\boldsymbol{x}}^{2} + \sigma\_{\boldsymbol{s}}^{2} + \sigma\_{\boldsymbol{y}}^{2} = 3I
$$

$$
\text{vector product}: \boldsymbol{\sigma} \times \boldsymbol{\sigma} \equiv \begin{pmatrix} \sigma\_{\boldsymbol{x}} \\ \sigma\_{\boldsymbol{s}} \\ \sigma\_{\boldsymbol{y}} \end{pmatrix} \times \begin{pmatrix} \sigma\_{\boldsymbol{x}} \\ \sigma\_{\boldsymbol{s}} \\ \sigma\_{\boldsymbol{y}} \end{pmatrix} = 2i \boldsymbol{\sigma}
$$

A real-space 3-vector *ω* <sup>=</sup> ωx ωs ωy can be represented by a 2 × 2 Hermitian matrix:

$$
\sigma \cdot \omega = \omega \cdot \sigma = \omega\_{\lambda}\sigma\_{\lambda} + \omega\_{\text{3}}\sigma\_{\text{3}} + \omega\_{\text{y}}\sigma\_{\text{y}} = \begin{pmatrix} \alpha\_{\text{y}} & \alpha\_{\text{x}} - i\alpha\_{\text{3}} \\ \alpha\_{\text{x}} + i\alpha\_{\text{s}} & -\alpha\_{\text{y}} \end{pmatrix}
$$

with the following properties:

$$\det|\boldsymbol{\sigma} \cdot \boldsymbol{\omega}| = -\boldsymbol{\omega}^2; \quad (\boldsymbol{\sigma} \cdot \boldsymbol{\omega})^n = \begin{cases} \boldsymbol{\omega}^n \boldsymbol{I} & \text{if n even} \\ \boldsymbol{\omega}^{n-1} (\boldsymbol{\sigma} \cdot \boldsymbol{\omega}) \text{ if n odd} \end{cases} \quad (|\boldsymbol{\omega}| = \boldsymbol{\omega}).$$

$$(\boldsymbol{\sigma} \cdot \boldsymbol{\omega}\_a)(\boldsymbol{\sigma} \cdot \boldsymbol{\omega}\_b) = \boldsymbol{I}(\boldsymbol{\omega}\_a \cdot \boldsymbol{\omega}\_b) + i\boldsymbol{\sigma} \cdot (\boldsymbol{\omega}\_a \times \boldsymbol{\omega}\_b).$$

# **3.4 Spin Transport**

# *3.4.1 An Optical Element*

An optical element may be represented by a 2 × 2 matrix (noted T, here). The transport of a spinor through that element writes

$$
\psi\_f = T(f \leftarrow i) \,\psi\_l \tag{3.2}
$$

with ψi and ψf the spinor respectively before and after the element.

Assume that the matrix <sup>T</sup> describes a spinor rotation by an angle <sup>φ</sup> *<sup>ω</sup>*, with *<sup>ω</sup>* <sup>=</sup> ωx ωs ωy the precession vector. T can thus be written under either one of the following different forms:

$$T = e^{\frac{i}{\mathcal{Z}} \left(\boldsymbol{\omega} \cdot \boldsymbol{\sigma}\right)} \phi$$

$$= I \cos \frac{\alpha \phi}{2} + i \left(\frac{\boldsymbol{\omega}}{\alpha} \cdot \boldsymbol{\sigma}\right) \sin \frac{\alpha \phi}{2}$$

$$= t\_0 I + i t\_\chi \sigma\_\chi + i t\_s \sigma\_s + i t\_\chi \sigma\_\chi$$

$$= \begin{pmatrix} t\_0 + i t\_\chi & t\_s + i t\_\chi \\ -t\_s + i t\_\chi \ t\_0 - i t\_\chi \end{pmatrix} \tag{3.3}$$

### 3 Spinor Methods 63

The coefficients t0,x,s,y introduced here satisfy

$$t\_0 = \cos\frac{\alpha\phi}{2},\ t\_\chi = \frac{\alpha\_\chi}{\alpha}\sin\frac{\alpha\phi}{2},\ t\_s = \frac{\alpha\_\theta}{\alpha}\sin\frac{\alpha\phi}{2},\ t\_y = \frac{\alpha\_\chi}{\alpha}\sin\frac{\alpha\phi}{2} \tag{3.4}$$

Note the properties:

$$\det(T) = t\_0^2 + t\_x^2 + t\_s^2 + t\_y^2 = 1; \ \text{tr}(T) = 2 \ t\_0; \quad \overbrace{T^\dagger \neq T}^{\text{non-Hermitian}}; \ \overbrace{T^\dagger T}^{\text{unitary}}$$

### **Examples**

	- spins precess around **B y**
	- by an angle <sup>φ</sup> <sup>=</sup> Gγ (θ<sup>2</sup> <sup>−</sup> <sup>θ</sup>1) (as (θ<sup>2</sup> <sup>−</sup> <sup>θ</sup>1) is the trajectory deviation), thus

$$\boldsymbol{\phi}\,\boldsymbol{\omega} = G\boldsymbol{\gamma}(\theta\_{2}-\theta\_{1})\begin{pmatrix} 0\\0\\1 \end{pmatrix} \quad \text{so that} \quad \boldsymbol{\phi}\,\boldsymbol{\omega}\cdot\boldsymbol{\sigma} = G\boldsymbol{\gamma}(\theta\_{2}-\theta\_{1})\begin{pmatrix} 0\\0\\1 \end{pmatrix} \cdot \begin{pmatrix} \sigma\_{\boldsymbol{x}}\\ \sigma\_{\boldsymbol{s}}\\ \sigma\_{\boldsymbol{\gamma}} \end{pmatrix} = G\boldsymbol{\gamma}(\theta\_{2}-\theta\_{1})\sigma\_{\boldsymbol{\gamma}}$$

yielding (Eqs. 3.2 and 3.3)

$$\psi(\theta\_2) = e^{\frac{i}{2}} G \gamma(\theta\_2 - \theta\_1) \sigma\_{\mathcal{V}} \psi(\theta\_1)$$

and finally

$$T(\theta\_2 \leftarrow \theta\_1) = e^{\frac{i}{2}} G \mathcal{V}(\theta\_2 - \theta\_1) \sigma\_Y$$

2. Over one turn along the closed orbit in a perfect ring, in the moving frame, (θ<sup>2</sup> <sup>−</sup> <sup>θ</sup>1) <sup>=</sup> <sup>2</sup>π, thus

$$
\psi(\theta\_2) = e^{\frac{i}{2}G\boldsymbol{\chi}\cdot\mathbf{2\pi}\boldsymbol{\sigma}\_{\boldsymbol{\chi}}}\psi(\theta\_1) = e^{\frac{i}{2}\mathcal{Z}\boldsymbol{\pi}\boldsymbol{\upsilon}\_{\text{sp}}\boldsymbol{\sigma}\_{\boldsymbol{\chi}}}\psi(\theta\_1),
$$

so that

$$T\_{\rm l-turn} = e^{\frac{l}{2} \cdot 2\pi \,\upsilon\_{\rm sp} \sigma\_{\rm y}}$$

wherein

$$2\pi \upsilon\_{\rm sp} = 2\pi G\chi \text{ is the spin precession angle over } (\theta\_2 - \theta\_1) = 2\pi, \sigma$$

$$\nu\_{\rm sp} = \text{spin time}.$$

# *3.4.2 Transpose to 3D Space*

Transposing spinor 2-vector transport through an optical element, namely,

$$
\psi\_f = T(f \leftarrow i)\,\psi\_i.
$$

to 3D space spin 3-vector transport, using the coefficients <sup>t</sup>0, tx, ts, ty of the 2 <sup>×</sup> <sup>2</sup> T-matrix (Eqs. 3.3 and 3.4), writes

$$\mathbf{S}\_{f} = \mathcal{M}(f \gets i)\mathbf{S}\_{i} = \begin{pmatrix} t\_{0}^{2} + t\_{x}^{2} - t\_{s}^{2} - t\_{y}^{2} & 2(t\_{x}t\_{s} + t\_{0}t\_{y}) & 2(t\_{x}t\_{y} - t\_{0}t\_{s})\\ 2(t\_{x}t\_{s} - t\_{0}t\_{y}) & t\_{0}^{2} - t\_{x}^{2} + t\_{s}^{2} - t\_{y}^{2} & 2(t\_{s}t\_{y} + t\_{0}t\_{x})\\ 2(t\_{x}t\_{y} + t\_{0}t\_{s}) & 2(t\_{s}t\_{y} - t\_{0}t\_{x}) & t\_{0}^{2} - t\_{x}^{2} - t\_{s}^{2} + t\_{y}^{2} \end{pmatrix} \mathbf{S}\_{i} \tag{3.5}$$

with **S**i and **S**f the spin 3-vectors respectively at entrance and exit of the optical element.

# *3.4.3 Rotations About the Moving Frame Axes*

Consider a rotation by an angle <sup>φ</sup> around the x axis, noting *<sup>ω</sup>* <sup>=</sup> **<sup>n</sup>**<sup>x</sup> <sup>=</sup> -1 0 0 the unit

x-rotation vector. Thus *<sup>ω</sup>* · *<sup>σ</sup>* <sup>=</sup> σx . This <sup>x</sup>-axis spinor rotation is represented by the matrix (Eq. 3.3)

$$T\_{\mathbf{x}\to\mathbf{rot}} = e^{\frac{i}{2}\left(\mathbf{n}\_{\mathbf{x}}\cdot\boldsymbol{\sigma}\right)}\phi = e^{\frac{i}{2}\sigma\_{\mathbf{x}}\phi} = I\cos\frac{\phi}{2} + i\,\sigma\_{\mathbf{x}}\sin\frac{\phi}{2} = t\_0I + it\_{\mathbf{x}}\sigma\_{\mathbf{x}}$$

$$= \begin{pmatrix} \cos\frac{\phi}{2} & i\sin\frac{\phi}{2} \\ i\sin\frac{\phi}{2} & \cos\frac{\phi}{2} \end{pmatrix} \tag{3.6}$$

Transpose to the 3D space rotation matrix M<sup>x</sup> using the t0,x,s,y coefficient notation (Eq. 3.5), this gives

$$M\_{\mathbf{x}\to\mathbf{rot}} = \begin{pmatrix} t\_0^2 + t\_\chi^2 & 0 & 0\\ 0 & t\_0^2 - t\_\chi^2 & 2t\_0 t\_\chi\\ 0 & -2t\_0 t\_\chi \ t\_0^2 - t\_\chi^2 \end{pmatrix} = \begin{pmatrix} 1 & 0 & 0\\ 0 & \cos\phi & \sin\phi\\ 0 & -\sin\phi \cos\phi \end{pmatrix}.$$

which is the expected form for a φ angle rotation around the x axis.

# **Repeat the Previous Calculation for the** s**-Axis and** y**-Axis Rotations**

An s-axis spinor rotation is represented by the matrix

$$T\_{\rm s-rot} = e^{\frac{l}{2}} \left(\mathbf{n}\_s \cdot \boldsymbol{\sigma}\right) \boldsymbol{\phi} = e^{\frac{l}{2}} \sigma\_s \, \boldsymbol{\phi} = I \cos\frac{\phi}{2} + i \, \sigma\_s \, \sin\frac{\phi}{2} = t\_0 I + it\_s \sigma\_s$$

$$= \begin{pmatrix} \cos\frac{\phi}{2} & \sin\frac{\phi}{2} \\ -\sin\frac{\phi}{2} \cos\frac{\phi}{2} \end{pmatrix} \tag{3.7}$$

Transpose to 3D space to get <sup>M</sup><sup>s</sup> <sup>−</sup> rot <sup>=</sup> cos φ 0 sin φ 0 10 <sup>−</sup> sin <sup>φ</sup> 0 cos <sup>φ</sup> 

A y-axis spinor rotation is represented by the matrix

$$T\_{\rm y-rot} = e^{\frac{i}{\Delta}}(\mathbf{n}\_{\rm y} \cdot \boldsymbol{\sigma})\,\boldsymbol{\phi} = e^{\frac{i}{\Delta}}\sigma\_{\rm y}\,\boldsymbol{\phi} = I\cos\frac{\boldsymbol{\phi}}{2} + i\,\sigma\_{\rm y}\,\sin\frac{\boldsymbol{\phi}}{2} = t\_0I + it\_{\rm y}\sigma\_{\rm y}$$

$$= \begin{pmatrix} e^{i\frac{\boldsymbol{\phi}}{2}} & 0\\ 0 & e^{-i\frac{\boldsymbol{\phi}}{2}} \end{pmatrix} \tag{3.8}$$

Transpose to 3D space to get <sup>M</sup><sup>y</sup> <sup>−</sup> rot <sup>=</sup> cos φ sin φ 0 <sup>−</sup> sin <sup>φ</sup> cos <sup>φ</sup> <sup>0</sup> 0 01

# *3.4.4 φ-Rotation About an Arbitrary Axis*

$$\text{Let } \mathbf{n} = \begin{pmatrix} n\_x \\ n\_s \\ n\_\mathbf{y} \end{pmatrix} \text{ be the rotation axis. The spinor rotation matrix wires } \mathbf{n}$$

<sup>T</sup>n−rot <sup>=</sup> <sup>e</sup> i <sup>2</sup> (**<sup>n</sup>** · *<sup>σ</sup>*) φ <sup>=</sup> <sup>I</sup> cos <sup>φ</sup> <sup>2</sup> <sup>+</sup> i (**<sup>n</sup>** · *<sup>σ</sup>* ) sin <sup>φ</sup> <sup>2</sup> <sup>=</sup> - cos <sup>φ</sup> <sup>2</sup> <sup>+</sup> iny sin <sup>φ</sup> <sup>2</sup> (inx <sup>+</sup> ns)sin <sup>φ</sup> 2 (inx <sup>−</sup> ns)sin <sup>φ</sup> <sup>2</sup> cos <sup>φ</sup> <sup>2</sup> <sup>−</sup> iny sin <sup>φ</sup> 2 

# *3.4.5 Transport Through a Sequence of Optical Elements*

Given the respective 2 <sup>×</sup> 2 spinor transport matrices <sup>T</sup><sup>1</sup> (1st element) and <sup>T</sup><sup>2</sup> (2nd element), and spinor states ψi and ψf respectively before the first and after the second element, the transport writes

$$\psi\_f = T\_2 \ T\_1 \psi\_l = e^{\frac{l}{2} \left( \omega\_2 \cdot \sigma \right) \phi\_2} e^{\frac{l}{2} \left( \omega\_1 \cdot \sigma \right) \phi\_1} \psi\_l \dots$$

$$= \left[ \cos \frac{\omega\_2 \phi\_2}{2} + i \left( \frac{\omega\_2}{\omega\_2} \cdot \sigma \right) \sin \frac{\omega\_2 \phi\_2}{2} \right] \left[ \cos \frac{\omega\_1 \phi\_1}{2} + i \left( \frac{\omega\_1}{\omega\_1} \cdot \sigma \right) \sin \frac{\omega\_1 \phi\_1}{2} \right]$$

The Pauli matrix properties and other aforementioned rules can be applied to expand this product. Alternatively, use the t0, tx , ts, ty coefficient notation (Eq. 3.3), which gives

$$T\_2 \ T\_1 = (It\_{2,o} + i\sigma\_3 t\_{2,x} + i\sigma\_3 t\_{2,s} + i\sigma\_3 t\_{2,y})(It\_{1,o} + i\sigma\_3 t\_{1,x} + i\sigma\_3 t\_{1,s} + i\sigma\_3 t\_{1,y})$$

$$= I(t\_{2,o}t\_{1,o} - t\_{2,x}t\_{1,x} - t\_{2,s}t\_{1,s} - t\_{2,y}t\_{1,y})$$

$$+ i\sigma\_3 (t\_{2,o}t\_{1,x} + t\_{2,x}t\_{1,o} - t\_{2,s}t\_{1,y} + t\_{2,y}t\_{1,s})$$

$$+ i\sigma\_3 (t\_{2,o}t\_{1,s} + t\_{2,x}t\_{1,y} + t\_{2,s}t\_{1,o} - t\_{2,y}t\_{1,x})$$

$$+ i\sigma\_3 (t\_{2,o}t\_{1,y} - t\_{2,x}t\_{1,s} + t\_{2,s}t\_{1,x} + t\_{2,y}t\_{1,o})\tag{3.9}$$

This generalizes to N optical elements:

$$
\psi\_f = T\_N \times \dots \times T\_2 \times T\_1 \,\,\psi\_l \tag{3.10}
$$

### **Example: A Local Field Error in an Otherwise Perfect Ring**

It has been shown that, for a y-axis spin precession by an angle <sup>φ</sup> <sup>=</sup> Gγ (θ<sup>2</sup> <sup>−</sup>θ1) over an orbital section (θ<sup>2</sup> <sup>−</sup> <sup>θ</sup>1) in uniform field,

$$\begin{aligned} \psi(\theta \mathbf{\hat{z}}) &= T(\theta \mathbf{\hat{z}} \leftarrow \theta \mathbf{\dot{l}}) \psi(\theta \mathbf{\dot{l}}) \,, \qquad T(\theta \mathbf{\hat{z}} \leftarrow \theta \mathbf{\dot{l}}) = e^{\frac{i}{2} \mathbf{\hat{z}} \cdot \mathbf{\hat{z}} \cdot (\theta\_2 - \theta\_1) \mathbf{\hat{z}}\_{\mathcal{Y}}} \end{aligned}$$

Now, add a local field error


$$T\_{\text{error}} = e^{\frac{i}{2}(\mathbf{n}\_e \cdot \boldsymbol{\sigma})\phi\_e}.$$

Thus, by virtue of the transport through a sequence of optical elements, the spinor transport matrix around the ring (θ<sup>1</sup> <sup>=</sup> 0, <sup>θ</sup><sup>2</sup> <sup>=</sup> <sup>2</sup>π, 0 < θe <sup>&</sup>lt; <sup>2</sup>π) writes

$$\begin{aligned} T\_{\text{l-turn}} &= T(2\pi \leftarrow \theta\_{\text{e}}) \ T\_{\text{error}} \ T(\theta\_{\text{e}} \leftarrow 0) \\\\ &= e^{\frac{i}{2}} G \gamma (2\pi - \theta\_{\text{e}}) \sigma\_{\text{y}} \ e^{\frac{i}{2} (\mathbf{n}\_{\text{e}} \cdot \boldsymbol{\sigma}) \phi\_{\text{e}}} e^{\frac{i}{2}} G \gamma \theta\_{\text{e}} \sigma\_{\text{y}} \end{aligned}$$

# *3.4.6 Precession Angle and Axis, from the* **2 × 2** *Spinor Map*

As seen earlier (Eq. 3.3), from the known quantities

precession angle ωφ and precession vector *ω* ω

the 2×2 spinor transport matrix can be written

$$T = e^{\frac{i}{2}\left(\omega \cdot \sigma\right)\phi} \ = I \cos\frac{\omega\phi}{2} + i\left(\frac{\omega}{\omega} \cdot \sigma\right)\sin\frac{\omega\phi}{2}$$

Now, conversely, if T is a spinor map, then

the precession angle ωφ satisfies cos ωφ <sup>2</sup> <sup>=</sup> <sup>1</sup> <sup>2</sup> tr(T ),

$$\text{and the precession vector is}\quad\omega = \frac{-i}{2\sin\frac{\alpha\phi}{2}}\operatorname{tr}(T\,\sigma) = \frac{-i}{2\sin\frac{\alpha\phi}{2}}\begin{pmatrix} \operatorname{tr}(T\,\sigma\_{\lambda})\\ \operatorname{tr}(T\,\sigma\_{\lambda})\\ \operatorname{tr}(T\,\sigma\_{\lambda}) \end{pmatrix}.$$

# • **? Precession Vector**

Demonstrate this latter relationship.

With the material introduced so far, the problem "Low Energy Spin Rotator" of Sect. 2.4 can be solved using spinor methods, this is the object of Exercise 1 (Sect. 3.7).

# **3.5 Periodic Structures**

From what precedes, with <sup>T</sup>1−turn the 1-turn spinor map of a planar, defect free periodic structure, and <sup>ν</sup>sp <sup>=</sup> ωφ/ <sup>2</sup><sup>π</sup> the spin tune, one gets

$$\cos \pi \,\nu\_{\rm sp} = \frac{1}{2} \, tr(T\_{\rm l-turn}) \tag{3.11}$$

whereas the stable precession vector satisfies

$$\mathbf{n} = \frac{-i}{2\sin\pi\nu\_{\rm sp}} \operatorname{tr}(T\_{\rm l-turn}\sigma) \tag{3.12}$$

# *3.5.1 Eigenvectors*

Note T (θ <sup>+</sup> <sup>2</sup><sup>π</sup> <sup>←</sup> θ ) <sup>=</sup> <sup>T</sup>1−turn the 1-turn spinor transport matrix at orbital angle θ (note that it can be transported at arbitrary observation azimuth θ using Eqs. 3.9 and 3.10). Let (θ ) be the 2-vector eigenvector, this property writes

$$
\Lambda(\theta + 2\pi) = T\_{1-\text{turn}}\Lambda(\theta) \qquad \text{ (this is the periodicity condition)}.
$$

### 3 Spinor Methods 69

or equivalently

$$(T\_{\text{l-turn}} - \lambda I)\Lambda = 0 \qquad \text{eigenvalue equation}$$

The two eigenvalues <sup>λ</sup><sup>±</sup> satisfy

$$\det(T\_{\text{l-turn}} - \lambda I) = \lambda^2 - \lambda \, tr(T) + \det(T) = 0$$

wherein (Eq. 3.3) T r(T ) <sup>=</sup> <sup>2</sup> <sup>t</sup><sup>0</sup> <sup>=</sup> 2 cos ωφ <sup>2</sup> , det (T ) <sup>=</sup> 1. This yields

$$\begin{array}{rclcrcl}\lambda\_{\pm} &=& t\_0 \pm i \sqrt{1 - t\_0^2} &=& \cos \frac{\omega \phi}{2} \pm i \sin \frac{\omega \phi}{2} &=& e^{\pm i \frac{\omega \phi}{2}} \end{array}$$

with ωφ the spin precession angle over a turn. The eigenvectors result, namely,

$$
\Lambda\_{\pm} = \begin{pmatrix} i\_{\text{ $t$ ,1-turn}} \mp \sqrt{1 - t\_{\text{ ${0,1-turn}$ }}^2} \\ -\, i\_{\text{ ${t,1-turn}$ }} + i\_{\text{ ${t,1-turn}$ }} \end{pmatrix}.
$$

This result can be transposed to real space 3-vector, using (Eq. 3.1)

$$\mathbf{n}\_{\pm} = \boldsymbol{\Lambda}\_{\pm}^{\dagger} \boldsymbol{\sigma}\_{\pm} \boldsymbol{\Lambda}\_{\pm}$$

which yields

$$\mathbf{n}\_{\pm} = \frac{(\pm)}{\sqrt{1 - t\_{0, \text{l-turn}}^2}} \begin{pmatrix} t\_{\chi, \text{l-turn}} \\ t\_{\text{s, l-turn}} \end{pmatrix} = \frac{(\pm)}{\omega} \begin{pmatrix} \omega\_{\chi} \\ \omega\_{\text{s}} \\ \omega\_{\text{y}} \end{pmatrix} \tag{3.13}$$

With the material introduced so far, the problem "Synchronized Torque" of Sect. 2.4 can be solved using spinor methods, this is the object of Exercise 2 (Sect. 3.7).

# *3.5.2 Differential Equation of Spin Motion*

Using spinors, the differential equation of spin motion writes

$$\frac{d\boldsymbol{\psi}}{d\theta} = \frac{i}{2} (\boldsymbol{\Omega} \cdot \boldsymbol{\sigma}) \boldsymbol{\psi} \quad \Leftrightarrow \quad \frac{d\mathbf{S}}{d\theta} = \mathbf{S} \times \mathbf{S}$$

Following an oft-met notation θ here denotes the trajectory deviation angle (velocity vector precession angle), *not* the orbital angle; dθ <sup>=</sup> 0 in field-free sections.

If the precession vector does not depend on <sup>θ</sup> the spinor form is readily integrated:

$$\frac{d\psi}{d\psi} = \frac{i}{2}(\mathfrak{A}\cdot\sigma)d\theta \quad \xrightarrow{f\_{\theta\_1}^{\theta\_2}} \quad \psi(\theta\_2) = e^{\frac{i}{2}(\mathfrak{A}\cdot\sigma)(\theta\_2-\theta\_1)}\psi(\theta\_1)$$

This represents a spin rotation around , by an angle *<sup>φ</sup>* <sup>=</sup> (θ<sup>2</sup> <sup>−</sup> <sup>θ</sup>1).

In a perfect ring, flat orbit, in the moving frame,

$$
\mathfrak{A} = \begin{pmatrix} 0 \\ 0 \\ G \underline{\gamma} \end{pmatrix} \quad \text{so that} \quad \mathfrak{A} \cdot \sigma = G \underline{\gamma} \,\, \sigma\_{\underline{\gamma}}.
$$

– which denotes a vertical rotation axis—this is what σy signifies,

– with precession angle <sup>φ</sup> <sup>=</sup> Gγ (θ<sup>2</sup> <sup>−</sup> <sup>θ</sup>1) over the interval [θ1, θ2].

If <sup>θ</sup><sup>2</sup> <sup>−</sup> <sup>θ</sup><sup>1</sup> <sup>=</sup> <sup>2</sup><sup>π</sup> the particle completes a full revolution, φ / <sup>2</sup><sup>π</sup> <sup>=</sup> Gγ is the number of spin precessions per turn, "spin tune",

$$\nu\_{\rm sp} = G\gamma$$

# **3.6 Spin Motion Near an Isolated Resonance**

Spin motion satisfies

$$\frac{d\mathbf{S}}{d\theta} = \mathbf{S} \times \mathbf{\mathfrak{B}}$$

In the presence of perturbing fields the precession axis is no longer vertical, namely,

$$
\mathfrak{Q} = \begin{pmatrix} \xi\_R \\ -\xi\_I \\ -G\mathcal{V} \end{pmatrix},
$$

with horizontal components x and s as detailed in Eqs. 2.14, 2.15, Chap. 2; note that the opposite sign of the y component stems from the choice of clockwise reference frame rotation along the reference orbit, there (Fig. 2.5), versus anticlockwise here (Fig. 3.1).

Reformulated in terms of spinors the equation of motion writes

$$\frac{d\psi}{d\theta} = \frac{i}{2}(\mathbf{\Omega} \cdot \boldsymbol{\sigma})\psi = \frac{i}{2}(\xi\_R \sigma\_\chi - \xi\_I \sigma\_\mathfrak{s} - G\boldsymbol{\chi}\sigma\_\mathfrak{y})\,\psi = \frac{i}{2}\begin{pmatrix} -G\boldsymbol{\chi} & \boldsymbol{\xi} \\ \boldsymbol{\xi}^\* & G\boldsymbol{\chi} \end{pmatrix}\psi$$

Develop the resonance strength in Fourier series:

$$\xi = \xi\_R + i\xi\_I = \overbrace{\left(\epsilon\_R + i\epsilon\_I\right)e^{-iG\eta\_n\theta}}^{\text{Fourier series over a period}} \quad \left[\begin{array}{c} \epsilon\_R + i\epsilon\_I = \epsilon\_n \text{, resonance strength} \\ G\gamma\_n = n \pm \nu\_\circ \text{, location of the resonance} \end{array}\right]$$

Move into the Gγn-frequency precessing frame; this change of variable has the merit of yielding a differential equation with constant coefficient,

$$\psi = e^{-\frac{i}{2}G\boldsymbol{\gamma}\_n\boldsymbol{\theta}\cdot\boldsymbol{\sigma}\_\circ}\phi = \left(I\cos\frac{G\boldsymbol{\gamma}\_n\boldsymbol{\theta}}{2} - i\boldsymbol{\sigma}\_\circ\sin\frac{G\boldsymbol{\gamma}\_n\boldsymbol{\theta}}{2}\right)\phi^2$$

Hence the new form

$$\frac{d\phi}{d\theta} = \frac{i}{2} \left[ \epsilon\_R \sigma\_x - \epsilon\_I \sigma\_x - (G\gamma - G\gamma\_n)\sigma\_y \right] \phi = \frac{i}{2} (\boldsymbol{\omega} \cdot \boldsymbol{\sigma}) \phi \quad \left[ \boldsymbol{\omega} = \begin{pmatrix} \epsilon\_R \\ -\epsilon\_I \\ -\delta\_n \end{pmatrix}, \delta\_n = G\gamma - G\gamma\_n \right].$$

which can readily be integrated,

$$\frac{d\phi}{d\phi} = \frac{i}{2}(\omega \cdot \sigma)d\theta \quad \xrightarrow{f\_{\theta\_1}^{\theta\_2}} \quad \phi(\theta\_2) = e^{\frac{i}{2}(\omega \cdot \sigma)(\theta\_2 - \theta\_1)}\phi(\theta\_1)$$

Back to the orbital frame:

$$\psi(\theta\_2) = e^{-\frac{i}{2}G\rho\_n\theta\_2\sigma\_\chi} e^{\frac{i}{2}(\boldsymbol{\omega}\cdot\boldsymbol{\sigma})(\theta\_2-\theta\_1)} e^{\frac{i}{2}G\rho\_n\theta\_1\sigma\_\chi} \psi(\theta\_1)$$

Introduce the <sup>t</sup>0,x,s,y coefficient notation, note that <sup>ω</sup> <sup>=</sup> <sup>|</sup>n|<sup>2</sup> <sup>+</sup> <sup>δ</sup><sup>2</sup> n; after some algebra (using Eqs. 3.3 and 3.9) the spinor transport matrix in the moving frame comes out [4],

$$T(\theta\_2 \leftarrow \theta\_1) = \tag{3.14}$$

$$I\left(\cos\frac{G\boldsymbol{\rho}\_{n}(\theta\_{2}-\theta\_{1})}{2}\cos\frac{\boldsymbol{\omega}(\theta\_{2}-\theta\_{1})}{2}-\frac{\delta\_{n}}{\omega}\sin\frac{G\boldsymbol{\gamma}\_{n}(\theta\_{2}-\theta\_{1})}{2}\sin\frac{\boldsymbol{\omega}(\theta\_{2}-\theta\_{1})}{2}\right)$$

$$+I\boldsymbol{\sigma}\_{x}\left(\frac{\epsilon\_{R}}{\omega}\cos\frac{G\boldsymbol{\gamma}\_{n}(\theta\_{1}+\theta\_{2})}{2}\sin\frac{\boldsymbol{\omega}(\theta\_{2}-\theta\_{1})}{2}+\frac{\epsilon\_{I}}{\omega}\sin\frac{G\boldsymbol{\gamma}\_{n}(\theta\_{1}+\theta\_{2})}{2}\sin\frac{\boldsymbol{\omega}(\theta\_{2}-\theta\_{1})}{2}\right)$$

$$\begin{aligned} &+i\sigma\_{\rm s}\left(-\frac{\epsilon\_{I}}{\omega}\cos\frac{G\gamma\_{n}(\theta\_{1}+\theta\_{2})}{2}\sin\frac{\omega(\theta\_{2}-\theta\_{1})}{2}+\frac{\epsilon\_{R}}{\omega}\sin\frac{G\gamma\_{n}(\theta\_{1}+\theta\_{2})}{2}\sin\frac{\omega(\theta\_{2}-\theta\_{1})}{2}\right) \\\\ &+i\sigma\_{\rm y}\left(-\frac{\delta\_{n}}{\omega}\cos\frac{G\gamma\_{n}(\theta\_{2}-\theta\_{1})}{2}\sin\frac{\omega(\theta\_{2}-\theta\_{1})}{2}-\sin\frac{G\gamma\_{n}(\theta\_{2}-\theta\_{1})}{2}\sin\frac{\omega(\theta\_{2}-\theta\_{1})}{2}\right) \end{aligned}$$

From this mapping it can be seen that the spin precession features a double frequency:


# *3.6.1 Case of an Integer Resonance,* **<sup>G</sup>***γn* **<sup>=</sup>** *integer*

In the expression for T (θ<sup>2</sup> <sup>←</sup> <sup>θ</sup>1) (Eq. 3.14) take


This results in:

$$T\_{\rm m-turn} = \pm \left( I \cos m\omega \pi + i\sigma\_x \frac{\epsilon\_R}{\omega} \sin m\omega \pi - i\sigma\_s \frac{\epsilon\_I}{\omega} \sin m\omega \pi - i\sigma\_\chi \frac{\delta\_n}{\omega} \sin m\omega \pi \right)$$

Note that with Gγn=integer, the Gγn frequency component vanishes, the ω frequency only is left.

Transpose to 3D space using the t0,x,s,y notation, that yields for the spin vector after m turns [4],

$$\mathbf{S}(m) = \begin{pmatrix} \mathbf{S}(m) \\\\ 2\frac{\epsilon\_R^2}{\alpha^2}\sin^2(m\alpha\pi) + \cos(2m\alpha\pi) & -2\frac{\epsilon\_R\epsilon\_I}{\alpha^2}\sin^2(m\alpha\pi) - \frac{\delta\_{\rm H}}{\alpha}\sin(2m\alpha\pi) & -2\frac{\epsilon\_R\delta\_{\rm H}}{\alpha^2}\sin^2(m\alpha\pi) + \frac{\epsilon\_I}{\alpha}\sin(2m\alpha\pi) \\\\ -2\frac{\epsilon\_R\epsilon\_I}{\alpha^2}\sin^2(m\alpha\pi) + \frac{\delta\_{\rm H}}{\alpha}\sin(2m\alpha\pi) & 2\frac{\epsilon\_I^2}{\alpha^2}\sin^2(m\alpha\pi) + \cos(2m\alpha\pi) & 2\frac{\epsilon\_I\delta\_{\rm H}}{\alpha^2}\sin^2(m\alpha\pi) + \frac{\epsilon\_R}{\alpha}\sin(2m\alpha\pi) \\\\ -2\frac{\epsilon\_R\delta\_{\rm H}}{\alpha^2}\sin^2(m\alpha\pi) - \frac{\epsilon\_I}{\alpha}\sin(2m\alpha\pi) & 2\frac{\epsilon\_I\delta\_{\rm H}}{\alpha^2}\sin^2(m\alpha\pi) - \frac{\epsilon\_R}{\alpha}\sin(2m\alpha\pi) & 2\frac{\delta\_{\rm H}}{\alpha^2}\sin^2(m\alpha\pi) + \cos(2m\alpha\pi) \end{pmatrix} \begin{pmatrix} \cos(\pi/\delta\_{\rm H}) \\\\ \cos(\pi/\delta\_{\rm H}) \end{pmatrix}$$

### 3 Spinor Methods 73

Spins precess at a frequency <sup>ω</sup> <sup>=</sup> <sup>|</sup>n|<sup>2</sup> <sup>+</sup> <sup>δ</sup><sup>2</sup> n, around a 3-vector which can be obtained by averaging over turns (an average denoted ∗), namely

$$\overline{\mathbf{S}} = \begin{pmatrix} \frac{\overline{S\_x}}{S\_x} \\ \frac{\overline{S\_y}}{S\_y} \end{pmatrix} = \begin{pmatrix} \frac{\epsilon\_R^2}{\omega^2} & -\frac{\epsilon\_R \epsilon\_I}{\omega^2} & -\frac{\epsilon\_R \delta\_n}{\omega^2} \\ -\frac{\epsilon\_R \epsilon\_I}{\omega^2} & \frac{\epsilon\_I^2}{\omega^2} & \frac{\epsilon\_I \delta\_n}{\omega^2} \\ -\frac{\epsilon\_R \delta\_n}{\omega^2} & \frac{\epsilon\_I \delta\_n}{\omega^2} & \frac{\delta\_n^2}{\omega^2} \end{pmatrix} \mathbf{S}(0) \tag{3.15}$$

Polarization <sup>|</sup>**S**<sup>|</sup> depends on the initial spin vector **<sup>S</sup>**(0). In particular if **<sup>S</sup>**(0) <sup>=</sup> (0, <sup>0</sup>, <sup>∓</sup>1), along the vertical axis, Eq. 3.15 yields the polarization vector (Fig. 3.2)

$$\overline{\mathbf{S}} = \frac{\pm \delta\_n}{|\epsilon\_n|^2 + \delta\_n^2} \begin{pmatrix} \epsilon\_R \\ -\epsilon\_I \\ -\delta\_n \end{pmatrix}$$

It can be verified that **S** is aligned on the periodic spin precession direction, as follows. Set m=1 in the m-turn matrix Tm−turn

$$T\_{1-turn} = \pm \left( I \cos \omega \pi + i \sigma\_\chi \frac{\epsilon\_R}{\omega} \sin \omega \pi - i \sigma\_\chi \frac{\epsilon\_I}{\omega} \sin \omega \pi - i \sigma\_\chi \frac{\delta\_n}{\omega} \sin \omega \pi \right)$$

This provides (Eq. 3.4) the coefficients <sup>t</sup><sup>0</sup> <sup>=</sup> cos ωπ, tx <sup>=</sup> R <sup>ω</sup> sin ωπ, ts <sup>=</sup> −I <sup>ω</sup> sinωπ, ty = −δn <sup>ω</sup> sin ωπ used in defining the eigenvectors **n**<sup>0</sup> (Eq. 3.13), so yielding

$$\mathbf{n}\_0 = \frac{(\pm)}{\sqrt{|\epsilon\_n|^2 + \delta\_n^2}} \begin{pmatrix} \epsilon\_R \\ -\epsilon\_I \\ -\delta\_n \end{pmatrix}$$

Far from the resonance:

$$|\delta\_n| = |G\boldsymbol{\gamma} - G\boldsymbol{\gamma}\_n| \to \infty \text{ thus } n\_\boldsymbol{x} \text{and } n\_\boldsymbol{s} \to 0, \ n\_\boldsymbol{\gamma} \to 1, \quad \mathbf{n}\_\mathbf{0} \parallel \mathbf{y}\_\mathbf{0}$$

beam polarization is vertical. On the resonance:

$$|\delta\_n| = 0 \text{ thus } n\_\circ = 0, \quad \mathbf{n} \mathbf{o} \perp \mathbf{y},$$

beam polarization lies in the (x,s) plane, along a direction R <sup>−</sup>I which depends on the observation azimuth θ.

# *3.6.2 Case of an Intrinsic Resonance,* **<sup>G</sup>***γn* **<sup>=</sup>** *integer* **<sup>±</sup>** *νy*

In the expression for T (θ<sup>2</sup> <sup>←</sup> <sup>θ</sup>1) (Eq. 3.14) substitute

$$
\theta\_1 = 0, \quad \theta\_2 = 2\pi m;
$$

This yields [4]

$$T\_{\rm m-tum} = I(\cos mG\wp\_n \pi \,\cos m\omega \pi - \frac{\delta\_n}{\omega} \sin mG\wp\_n \pi \,\sin m\omega \pi)$$

$$+ i\sigma\_\chi (\frac{\epsilon\_R}{\omega} \cos mG\wp\_n \pi \,\sin m\omega \pi + \frac{\epsilon\_I}{\omega} \sin mG\wp\_n \pi \,\sin m\omega \pi)$$

$$+ i\sigma\_\chi (-\frac{\epsilon\_I}{\omega} \cos mG\wp\_n \pi \,\sin m\omega \pi + \frac{\epsilon\_R}{\omega} \sin mG\wp\_n \pi \,\sin m\omega \pi)$$

$$+ i\sigma\_\chi (-\frac{\delta\_n}{\omega} \cos mG\wp\_n \pi \,\sin m\omega \pi - \sin mG\wp\_n \pi \,\cos m\omega \pi)\tag{3.16}$$

Regarding the precession motion of the spin vector **<sup>S</sup>**, inspection of the <sup>T</sup>m−turn matrix shows that (Fig. 3.3)


– with an average zero value:

$$<\mathcal{S}\_{\underline{\chi}} >\_{\text{turn}} = 0 \quad \text{and} \quad <\mathcal{S}\_{\underline{s}} >\_{\text{turn}} = 0$$

**Fig. 3.3** Spins **S**(m) precess at frequency ω around the eigenvector vector **n**, which itself precesses around the vertical axis at frequency Gγ

by contrast with the integer resonance case,


$$S\_{\mathbf{y}} = -\left(2\frac{\epsilon\varrho\frac{\delta\_{\mathbf{z}}}{\alpha^{2}}\sin^{2}(m\omega\boldsymbol{\pi}) + \frac{\epsilon\varrho}{\alpha}\sin(2m\omega\boldsymbol{\pi})\right)S\_{\mathbf{x}}(0)$$

$$+ \left(2\frac{\epsilon\varrho\frac{\delta\_{\mathbf{z}}}{\alpha^{2}}\sin^{2}(m\omega\boldsymbol{\pi}) - \frac{\epsilon\varrho}{\alpha}\sin(2m\omega\boldsymbol{\pi})\right)S\_{\mathbf{x}}(0) + \left(2\frac{\delta\_{\mathbf{z}}^{2}}{\alpha^{2}}\sin^{2}(m\omega\boldsymbol{\pi}) + \cos(2m\omega\boldsymbol{\pi})\right)S\_{\mathbf{y}}(0)$$

– thus a polarization state (the average over turns)

$$\overline{\mathbf{S}} = \frac{\delta\_n}{|\epsilon\_n|^2 + \delta\_n^2} \begin{pmatrix} 0 \\ 0 \\ -\epsilon\_R \mathbf{S}\_\mathbf{x}(0) + \epsilon\_I \mathbf{S}\_\mathbf{s}(0) + \delta\_n \mathbf{S}\_\mathbf{y}(0) \end{pmatrix}.$$

– and note: the vertical component < Sy > has the same value as in the case of an integer resonance (Eq. 3.15).

The spin precession vector is obtained from the 1-turn spinor transport matrix, as follows.

Take an arbitrary turn, <sup>θ</sup><sup>1</sup> <sup>=</sup> <sup>2</sup>πm, and <sup>θ</sup><sup>2</sup> <sup>=</sup> <sup>θ</sup><sup>1</sup> <sup>+</sup> <sup>2</sup>π, thus (Eq. 3.17)

$$T\_{1-\text{turn}} = I\left(\cos G\wp\_n\pi\cos\omega\pi - \frac{\delta\_n}{\omega}\sin G\wp\_n\pi\sin\omega\pi\right)$$

$$+ i\sigma\_3\left(\frac{\epsilon\_R}{\omega}\cos G\wp\_n\pi(2m+1)\sin\omega\pi + \frac{\epsilon\_I}{\omega}\sin G\wp\_n\pi(2m+1)\sin\omega\pi\right)$$

$$+ i\sigma\_3\left(-\frac{\epsilon\_I}{\omega}\cos G\wp\_n\pi(2m+1)\sin\omega\pi + \frac{\epsilon\_R}{\omega}\sin G\wp\_n\pi(2m+1)\sin\omega\pi\right)$$

$$+ i\sigma\_3\left(-\frac{\frac{\delta\_n}{\omega}\cos G\wp\_n\pi}{\frac{\epsilon\_0}{\omega}}\sin\omega\pi - \sin G\wp\_n\pi\sin\omega\pi\right)\tag{3.17}$$

the eigenvector is obtained from the 1-turn matrix, for the record (Eq. 3.13)

$$\mathbf{n}\_{\pm} = \frac{(\pm)}{\sqrt{1 - t\_{0, 1-\text{turn}}^2}} \begin{pmatrix} t\_{\chi, 1-\text{turn}} \\ t\_{s, 1-\text{turn}} \\ t\_{\chi, 1-\text{turn}} \end{pmatrix}.$$

with the following properties:


# **Example: Proximity of** Gγ <sup>=</sup> <sup>0</sup> <sup>−</sup> νy **Intrinsic Resonance in the AGS Booster**

The AGS injector ring (AGS Booster) is described in Chap. 14 which may be referred to for details. Polarized helion particles are considered, <sup>G</sup> = −4.184153. The vertical tune is set to νy <sup>=</sup> <sup>4</sup>.82, resonance occurs at Gγ = −4.82.

Given the betatron amplitude considered here, the resonance strength (Eq. 2.35) takes the value <sup>|</sup>n| = <sup>0</sup>.00132.

Consider Fig. 3.4:


**Fig. 3.4** Helion spin precession at Gγ = −νy in the AGS Booster, observed turn-by-turn at some azimuth around the ring. The vertical spin component Sy oscillates slowly (solid sinusoids), frequency <sup>ω</sup> 1; three different distances to the resonance are plotted, δn <sup>=</sup> 0 (0), δn = |n<sup>|</sup> (1) and 2|n<sup>|</sup> (2). Full amplitude occurs on the resonance. The oscillation of Sx and Ss components (dots) is fast, frequency Gγn <sup>=</sup> <sup>4</sup>.82, and modulated, modulation frequency <sup>ω</sup> <sup>=</sup> δ2 <sup>n</sup> + |n<sup>|</sup> <sup>2</sup> = <sup>|</sup>n<sup>|</sup> here, on resonance

# **3.7 Homework**

In the following two exercises, the questions addressed in the Exercises 1 and 3 of Chap. 2 (Sect. 2.3) via numerical simulations, are treated using spinors.

# • **? Exercise 1: Low Energy Spin Rotator**


### **Solution**

1.a: The spinor rotation matrix is ( · *σ*)φ with <sup>φ</sup> the spin rotation angle. The 2 × 2 transfer matrix is

$$T = e^{\frac{i}{2}(\mathfrak{Q}\cdot\sigma)\phi} = I\cos\frac{\mathfrak{Q}\phi}{2} + i\left(\frac{\mathfrak{Q}}{\mathfrak{Q}}\cdot\sigma\right)\sin\frac{\mathfrak{Q}\phi}{2}$$

 <sup>=</sup> ⎛ ⎝ X Y Z ⎞ ⎠ ≡ ⎛ ⎝ 0 0 Z ⎞ <sup>⎠</sup> as both **<sup>E</sup>** and **<sup>B</sup>** result in a precession around the vertical (Z) axis.

Thus · *<sup>σ</sup>* <sup>=</sup> <sup>Z</sup> σZ, <sup>|</sup>Z|=| <sup>|</sup>, <sup>T</sup> <sup>=</sup> <sup>e</sup> i 2 Z φ σZ <sup>=</sup> <sup>I</sup> cos Zφ <sup>2</sup> <sup>+</sup> i σZ sin Zφ 2

$$\mathbf{H} = \cos\frac{\Omega\_Z \phi}{2} \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} + i \sin\frac{\Omega\_Z \phi}{2} \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} i\frac{\Omega\_Z \phi}{2} & 0 \\ e^{i\frac{\Omega\_Z \phi}{2}} & 0 \\ 0 & e^{-i\frac{\Omega\_Z \phi}{2}} \end{pmatrix}$$

With precession angle Zφ <sup>=</sup> π/2, Zφ <sup>2</sup> <sup>=</sup> π/4, one gets <sup>e</sup> ±i Zφ <sup>2</sup> <sup>=</sup> <sup>1</sup> <sup>±</sup> <sup>i</sup> √2 , thus

$$T = \begin{pmatrix} \frac{1+i}{\sqrt{2}} & 0\\ 0 & \frac{1-i}{\sqrt{2}} \end{pmatrix}$$

Transform to real 3D space using **<sup>S</sup>** <sup>=</sup> <sup>ψ</sup>† *σ*ψ, this yields the expected π/2 angle Z-rotation matrix

$$M\_{\mathbf{x}} = \begin{pmatrix} 0 & 1 & 0 \\ -1 & 0 & 1 \\ 0 & 0 & 1 \end{pmatrix}$$

Apply to initial **S**<sup>i</sup> = -1 0 0 , this yields the expected

$$\mathbf{S}\_f = M \mathbf{S}\_l = \begin{pmatrix} 0 \\ -1 \\ 0 \end{pmatrix}$$

1.b: Numerical checks with tracking simulation outcomes are straight forward.

# • **? Exercise 2: Synchronized Torque**


### **Solution**

2.a: The solenoid causes a s-rotation of angle φs, it is thus represented by the matrix (with **n**<sup>s</sup> a unit vector along the s-axis)

$$T\_{\text{spinR}} = e^{\frac{i}{2}} \left( \mathbf{n}\_s \cdot \boldsymbol{\sigma} \right) \phi\_s \quad \stackrel{i}{=} e^{\frac{i}{2}} \sigma\_s \phi\_s \quad = I \cos \frac{\phi\_s}{2} + i \sigma\_s \sin \frac{\phi\_s}{2} = \begin{pmatrix} \cos \frac{\phi\_s}{2} & \sin \frac{\phi\_s}{2} \\ -\sin \frac{\phi\_s}{2} \cos \frac{\phi\_s}{2} \end{pmatrix}$$

which expectedly coincides with the s-axis spinor rotation matrix (Eq. 3.7).

2.b: The ring with φs torque is represented by the spinor matrix

$$T\_{\rm ring} = \epsilon^2 \stackrel{i}{2} (\mathbf{n}\_\circ \cdot \boldsymbol{\sigma}) G \boldsymbol{\chi} \, 2\pi \stackrel{i}{\underset{\mathbf{e}}{\sim}} (\mathbf{n}\_s \cdot \boldsymbol{\sigma}) \boldsymbol{\phi}\_s \, \ = \left( I \cos G \boldsymbol{\chi} \, \pi + i \boldsymbol{\sigma}\_\circ \sin G \boldsymbol{\chi} \, \pi \right) \left( I \cos \frac{\boldsymbol{\phi}\_s}{2} + i \boldsymbol{\sigma}\_\circ \sin \frac{\boldsymbol{\phi}\_s}{2} \right) \boldsymbol{\phi}\_s$$

thus, given <sup>−</sup>σyσs <sup>=</sup> iσx,

$$T\_{\rm ring} = I \cos G\chi \pi \quad \cos \frac{\phi\_s}{2} + i\sigma\_x \sin G\chi \\ \pi \quad \sin \frac{\phi\_s}{2} + i\sigma\_y \sin \frac{\phi\_s}{2} \quad \cos G\chi \\ \pi + i\sigma\_y \sin G\chi \\ \pi \quad \cos \frac{\phi\_s}{2}$$

Under explicit 2×2 matrix form: this is also simply the product of <sup>y</sup>-axis and <sup>s</sup>-axis spinor rotations, namely

$$T\_{\rm ring} = \begin{pmatrix} e^{iG\boldsymbol{\chi}\cdot\boldsymbol{\pi}} & 0\\ 0 & e^{-iG\boldsymbol{\chi}\cdot\boldsymbol{\pi}} \end{pmatrix} \begin{pmatrix} \cos\frac{\phi\_{\boldsymbol{\pi}}}{2} & \sin\frac{\phi\_{\boldsymbol{\pi}}}{2} \\ -\sin\frac{\phi\_{\boldsymbol{\pi}}}{2}\cos\frac{\phi\_{\boldsymbol{\pi}}}{2} \end{pmatrix} = \begin{pmatrix} e^{iG\boldsymbol{\chi}\cdot\boldsymbol{\pi}}\cos\frac{\phi\_{\boldsymbol{\pi}}}{2} & e^{iG\boldsymbol{\chi}\cdot\boldsymbol{\pi}}\sin\frac{\phi\_{\boldsymbol{\pi}}}{2} \\ -e^{-iG\boldsymbol{\chi}\cdot\boldsymbol{\pi}}\sin\frac{\phi\_{\boldsymbol{\pi}}}{2} & e^{-iG\boldsymbol{\chi}\cdot\boldsymbol{\pi}}\cos\frac{\phi\_{\boldsymbol{\pi}}}{2} \end{pmatrix}.$$

2.c: The spin tune satisfies: cos πνsp <sup>=</sup> <sup>1</sup> <sup>2</sup>Tr(Tring) <sup>=</sup> cos Gγ π cos φs <sup>2</sup> , so

$$\operatorname{trace}(\nu\_{\rm sp}) = \pm \frac{1}{\pi} \arccos(\cos G \gamma \pi \cos \frac{\phi\_s}{2})$$

Numerically:

$$\begin{aligned} \text{case E} &= 200 \,\text{keV}, \, G\gamma = 1.793229, \, \phi\_s = \frac{\pi}{6} \implies \text{frac}(\upsilon\_{\text{sp}}) = 0.220656 \\\\ \text{case E} &= 370.0825 \,\text{MeV}, \, G\gamma = 2, \, \phi\_s = \frac{\pi}{6} \implies \text{frac}(\upsilon\_{\text{sp}}) = 0.08333 \\\\ \text{case E} &= 370.0825 \,\text{MeV}, \, G\gamma = 2.5, \, \phi\_s = \frac{\pi}{6} \implies \text{frac}(\upsilon\_{\text{sp}}) = 0.5 \end{aligned}$$

All three cases are in accord with the numerical simulation results of Exercise 2 in Chap. 2.

2.d: The spin closed orbit, or periodic spin vector, can be obtained by taking the ti components from the form (slide 7) <sup>T</sup>ring <sup>=</sup> <sup>t</sup>0<sup>I</sup> <sup>+</sup> iσxtx <sup>+</sup> iσsts <sup>+</sup> iσyty, namely

$$\mathbf{n}\_{\pm} = \begin{pmatrix} \pm \frac{t\_{\mathbf{x},1-\text{turn}}}{\sqrt{1-t\_{0,1-\text{turn}}^2}}\\ \pm \frac{t\_{\mathbf{s},1-\text{turn}}}{\sqrt{1-t\_{0,1-\text{turn}}^2}}\\ \pm \frac{t\_{\mathbf{y},1-\text{turn}}}{\sqrt{1-t\_{0,1-\text{turn}}^2}} \end{pmatrix}$$

Thus Tring as obtained above yields

$$t\_0 = \cos G\gamma \pi \,\,\cos \frac{\phi\_s}{2} \quad \rightarrow \quad \sqrt{1 - t\_{0, 1-\text{turn}}^2} = \sin \pi \,\nu\_{sp}$$

and

$$t\_{\mathbb{X}} = \sin G\gamma \pi \, \sin \frac{\phi\_s}{2}, \ t\_{\mathbb{Y}} = \sin \frac{\phi\_s}{2} \cos G\gamma \pi, \ t\_{\mathbb{\varepsilon}} = \sin G\gamma \pi \, \cos \frac{\phi\_s}{2}$$

so that

$$\mathbf{n}\_{\pm} = \pm \begin{pmatrix} \sin G\gamma\pi & \sin \frac{\phi\_{\rm s}}{2} / \sin \pi \,\upsilon\_{\rm sp} \\ \cos G\gamma\pi & \sin \frac{\tilde{\phi}\_{\rm s}}{2} / \sin \pi \,\upsilon\_{\rm sp} \\ \sin G\gamma\pi & \cos \frac{\tilde{\phi}\_{\rm s}}{2} / \sin \pi \,\upsilon\_{\rm sp} \end{pmatrix}$$

.

Numerically

$$\begin{aligned} \text{case E} &= 200 \,\text{keV}, \quad \mathbf{n}\_{\pm} = \pm \begin{pmatrix} 0.3225386 \\ -0.2449867 \\ -0.91430318 \end{pmatrix} \\\\ \text{case E} &= 108.4116 \,\text{MeV}, \quad \mathbf{n}\_{\pm} = \pm \begin{pmatrix} 1 \\ 0 \\ 0 \end{pmatrix} \\\\ \text{case E} &= 370.0825 \,\text{MeV}, \quad \mathbf{n}\_{\pm} = \pm \begin{pmatrix} 0 \\ 0.258819 \\ 0.96692 \end{pmatrix} \end{aligned}$$

to be compared with the numerical results for the spin closed orbit vector at the origin of the optical sequence in Exercise 2.d, Chap. 2.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 4 Rotators and Snakes**

**Vadim Ptitsyn**

**Abstract** This lecture introduces various kinds of spin rotating devices used in present particle accelerators. They include Siberian Snakes used for polarization preservation and spin rotators used for creating a specific polarization orientation in experimental locations. Following the analysis of spin rotation in different types of magnets, approaches for designing spin rotating devices are discussed. Considerations for appropriate design choices of spin rotating devices in dependence on the beam energy are given. Examples of Snakes and spin rotators used in past accelerators as well as designs considered for future ones are presented.

# **4.1 Spin Rotation Devices**

When describing spin motion in a circular accelerator the central role belongs to periodical spin solution **n**ˆ **<sup>0</sup>** on beam closed orbit:

$$
\hat{\mathbf{n}}\_{\mathbf{0}}(\mathbf{s}) = \hat{\mathbf{n}}\_{\mathbf{0}}(\mathbf{s} + \mathbf{C}) \tag{4.1}
$$

which is also called the stable spin direction. The importance of the vector **<sup>n</sup>**<sup>ˆ</sup> **<sup>0</sup>***(s)* comes from the fact that particle spin aligned along this vector repeats its direction

V. Ptitsyn (-)

83

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Electron-Ion Collider, Brookhaven National Laboratory, Upton, NY, USA e-mail: vadimp@bnl.gov

on every turn. Particle spins not aligned with the vector **n**ˆ **<sup>0</sup>** rotate around this vector, thus the spin projections on the vector **n**ˆ **<sup>0</sup>** are preserved. This defines an observable beam polarization at a given location.

Let's first consider a circular accelerator without any spin rotators. We assume that there is no magnet misalignments or magnet errors affecting the beam vertical orbit. Thus, the closed beam orbit is formed by vertical guiding field of dipole magnets and is in the horizontal plane everywhere. It is easy to see that in this case the periodical spin solution **<sup>n</sup>**<sup>ˆ</sup> **<sup>0</sup>** is vertical at any ring azimuth *<sup>s</sup>*. And it remains vertical for any beam energy. Without betatron coupling the stable spin solution also remains vertical on a closed orbit for off-momentum particle, defined by the horizontal dispersion function. Obviously, this is very good case for controlling the polarization since one gets spin orientation at all energies parallel.

But often one needs to change the stable spin direction from vertical, which can be done by introducing non-vertical fields on the closed beam orbit in the accelerator. It affects the stable spin direction and makes it to deviate locally or globally from the vertical. Examples of such non-vertical fields are solenoid magnets having longitudinal field, or vertical bending magnets having a horizontal magnetic field. Various kinds of spin rotating devices utilizing non-vertical guiding fields are used in circular accelerators. They include:


When working on design of a spin rotating device scientists and engineers become concerned with several design aspects. The spin rotating device should be compact in order to fit well into the accelerator lattice. It should produce sufficiently small orbit excursions. It also should have minimum effect on the beam optics and non-linear beam dynamics. Some of spin rotating devices have to operate in wide energy range.

In following description spin rotation matrices in the spinor presentation will be given for different types of magnets and spin rotating devices. We will use the spinor matrix form corresponding to right-handed convention for the spin rotation:

$$M = \exp[-i(\boldsymbol{\sigma} \cdot \mathbf{b})\frac{\varphi}{2}] = I\cos(\varphi/2) - i(\boldsymbol{\sigma} \cdot \mathbf{b})\sin(\varphi/2) \tag{4.2}$$

where *ϕ* is the spin rotation angle around the rotation axis **b** (**b** is unit vector), and *σ* is a vector with components the Pauli matrices (Chap. 3).

# **4.2 Spin Rotation in Different Types of Accelerator Magnets**

# *4.2.1 Spin Rotation in Solenoidal Field*

First, we consider a solenoidal magnet which is a magnet with the longitudinally oriented magnetic field. In such magnet a particle which travels along the magnet axis preserves straight line trajectory. The spin rotates around longitudinal direction, hence the longitudinally oriented spin is preserved. The spin rotation angle around the longitudinal axis for a particle with the charge *e*, momentum *p* and anomalous magnetic moment *G* is defined by the field integral of solenoidal field:

$$\phi\_{sp} = -(1+G)\frac{e}{p}\int B\_{sol} \cdot ds\tag{4.3}$$

If one would want to realize the spin rotation *φ* using the solenoidal magnet, the required field integral is:

$$B\_{sol} \cdot L = \frac{\phi}{\pi} \frac{10.479}{1 + G} p(\text{GeV}/c) \tag{4.4}$$

For 20 GeV/c protons (*<sup>G</sup>* <sup>=</sup> <sup>1</sup>*.*79) to rotate spin by 180◦ the field integral *Bsol* ·*<sup>L</sup>* <sup>=</sup> <sup>75</sup>*.*<sup>1</sup> <sup>T</sup>·m is needed. For the electron beam (*<sup>G</sup>* <sup>=</sup> <sup>0</sup>*.*00116) <sup>1</sup> having the same 20 GeV energy, the required field integral is considerably larger: *Bsol* · *<sup>L</sup>* <sup>=</sup> <sup>209</sup>*.*3T·m .

The major convenience of the spin rotator design based on solenoidal magnets is that the beam orbit is not distorted in this case. A disadvantage is that the field integral required for spin rotation is proportional to particle momentum. Thus, the use of these spin rotators is limited to the energies below 30 GeV.

The spinor transformation matrix for solenoidal field is written as:

$$M\_{sol} = \cos(\phi\_{sp}/2) - i\sigma\_2 \sin(\phi\_{sp}/2) \tag{4.5}$$

# *4.2.2 Spin Rotation in Dipole Field*

In a dipole magnet the magnetic field is orthogonal to the particle trajectory. The beam trajectory is curved. The spin equation becomes:

$$\frac{d\mathbf{S}}{ds} = -\frac{e(\mathbf{l} + G\boldsymbol{\chi})}{p} \,\mathbf{B}\_{dip} \times \mathbf{S} \tag{4.6}$$

<sup>1</sup> We would like to note that the accepted symbol in scientific papers for the electron magnetic anomaly is *a*.

The particle spin rotates around the magnetic field direction. But when considering the spin rotation angle resulting formulas depend on the coordinate frame. Often the laboratory frame, which has fixed orientation of coordinate axes, presents an appropriate coordinate frame for considering spin propagation. For instance, when considering a spin rotator with the particle orbit restored at the end of the rotator the laboratory frame is more convenient choice for design consideration. Resulting spin rotation angle in the laboratory frame can be written as:

$$\phi\_{sp} = -(1 + G\chi)\frac{e}{p} \int B\_{dip} \cdot ds = -(\frac{1}{\chi} + G)\frac{e}{m\beta c} \int B\_{dip} \cdot ds \tag{4.7}$$

Let's note that in this case for relativistic beams (*γ >>* 1) the spin rotation does not depend on the beam energy. It is all defined by the field integral.

Another coordinate frame that can be used is the accelerator frame which follows particle velocity rotation on the design closed orbit. The particle velocity vector remains constant in the accelerator frame. If one considers the spin rotation in a dipole magnet in such frame, the rotation of particle velocity is subtracted. It leads to the spin rotation proportional to the particle *γ* :

$$\phi\_{sp} = G\gamma \frac{e}{p} \int B\_{dip} ds = G\gamma \theta \tag{4.8}$$

where *θ* is the velocity rotation angle. One obvious conclusion from the formula (4.8) is that in a ring with only vertical guiding field one turn spin rotation is 2*πGγ* , which defines the spin tune equal to *Gγ* .

# *4.2.3 Spin Rotation in Helical Dipole Field*

As shown in Fig. 4.1 a helical dipole magnet is described by the following paraxial field (without magnet edges):

$$B\_\circ = B\_0 \cos ks, \quad B\_\times = -B\_0 \sin ks \tag{4.9}$$

**Fig. 4.1** The fields in one period of helical dipole magnet

### 4 Rotators and Snakes 87

where

$$k = \mathcal{R} \frac{2\pi}{\lambda} \tag{4.10}$$

and *λ* is the helical twist period. Compared with common dipole the helical dipole has an additional parameter, the helicity *R*, which is equal to either +1 or -1.

Actual helical field is intrinsically nonlinear. It also contains longitudinal offaxis component. For instance, if we limit consideration to second order terms in transverse coordinates, the helical field expressions become:

$$\begin{aligned} B\_{\chi} &= -B\_{0} \{ [1 + \frac{k^{2}}{8} (3\mathbf{x}^{2} + \mathbf{y}^{2})] \sin(ks) - \frac{k^{2}}{4} \mathbf{x} \mathbf{y} \cos(ks) \} \\ B\_{\mathbf{y}} &= B\_{0} \{ [1 + \frac{k^{2}}{8} (\mathbf{x}^{2} + 3\mathbf{y}^{2})] \cos(ks) - \frac{k^{2}}{4} \mathbf{x} \mathbf{y} \sin(ks) \} \\ B\_{\mathbf{s}} &= -B\_{0} k \{ \mathbf{x} \cos(ks) + \mathbf{y} \sin(ks) \} \end{aligned} \tag{4.11}$$

But, in most cases, when the particle trajectory stays close to the helical magnet axis, the evaluation of the spin and particle motion using the paraxial helical fields presents a quite good approximation.

Resolving the orbital motion in the paraxial approximation one gets following expressions for a particle trajectory:

$$\mathbf{x}(\mathbf{s}) = -r(\mathbf{l} - \cos(ks)) + \mathbf{x}\_0 + \mathbf{x}\_0'\mathbf{s},\tag{4.12}$$

$$\mathbf{y}(\mathbf{s}) = -r\sin(ks) + \mathbf{y}\_0 + (\mathbf{y}\_0' + kr)\mathbf{s}$$

The trajectory is a spiral with a shifted axis. The radius *r* of the spiral orbit is:

$$r = \frac{eB\_0}{k^2 p} = \frac{B\_0 c}{k^2 \beta} \frac{e}{E} \tag{4.13}$$

If *x* <sup>0</sup> <sup>=</sup> <sup>0</sup> and *<sup>y</sup>* <sup>0</sup> = 0 the orbit is shifted after one helix period by:

$$
\delta \mathbf{y} = 2\pi \,\mathrm{R}r \tag{4.14}
$$

as shown in Fig. 4.2. One can note that flipping simultaneously the sign of magnetic field and the helicity does not change the orbit shift.

For evaluation of the spin motion it is convenient to use a coordinate frame, rotating around the longitudinal axis in which the vector of magnetic field remains constant. In the rotating coordinate frame the spin motion equation

$$\frac{d\mathbf{S}}{ds} = \tilde{\mathbf{W}}\_{\mathbf{k}} \times \mathbf{S} \tag{4.15}$$

**Fig. 4.2** The beam orbit transformation through one period of helical dipole magnet

has the spin precession vector **W**˜ **<sup>k</sup>** with following components:

$$\begin{aligned} \tilde{W}\_{\chi} &= 0 \\ \tilde{W}\_{\chi} &= -\frac{e(1 + G\gamma)}{p} B\_0, \\ \tilde{W}\_{\chi} &= -k \end{aligned} \tag{4.16}$$

Since the precession frequency is constant the spin motion is easily resolved. After one helix period the axes of rotating and laboratory frame coincide. From here one can find one period transformation of the spin vector in the laboratory frame. This transformation is characterized by the rotation angle *φsp* and the rotation axis **b**:

$$
\phi\_{sp} = 2\pi\sqrt{1 + \chi^2} \tag{4.17}
$$

$$b\_{\chi} = 0, \quad b\_{\chi} = -\frac{\chi}{\sqrt{1 + \chi^2}}, \quad b\_{\chi} = -\frac{R}{\sqrt{1 + \chi^2}}.\tag{4.18}$$

$$\chi = (G + 1/\chi) \frac{eB\_0}{m\beta c|k|} \tag{4.19}$$

The helical dipole has an additional degree of freedom compared with the normal dipole: the helicity of helical twist *R*. That leads to four possible orientations of spin rotation axis of one period spin transformation, as shown in Fig. 4.3 with the same spin rotation angle *φsp*. Two of the axes orientations correspond to a positive shift of the beam orbit, while two others correspond to a negative shift. All this provides a good degree of flexibility when designing a spin rotator device consisting of several one period helical dipole modules. In addition, by rotating a helical dipole magnet

around its longitudinal axis one can place the spin rotation axis in other planes, defined by the orientation of the magnetic field at the magnet entrance.

# *4.2.4 Spin Rotation in Combined Electrical and Magnetic Field: Wien Filter*

At very low energies an elegant way to realize spin rotation without distorting the beam orbit is given by the Wien filter. The Wien filter utilizes a combination of static transverse electrical and magnetic fields, oriented orthogonally to each other (Fig. 4.4). In order to have the beam trajectory straight the following condition relating electric and magnetic field values has to be satisfied:

$$\frac{\mathbf{E} \times \mathbf{v}}{c^2} = \frac{1 - \chi^2}{\chi^2} B\_\perp \tag{4.20}$$

The spin rotation axis is defined by magnetic field direction. And the spin rotation angle is:

$$
\varphi = \frac{e(\mathbf{l} + G)}{\nu^2 \beta mc} \int B ds\tag{4.21}
$$

*γ* <sup>2</sup> dependence of the spin rotation limits using this device to very low energies. The required electrical field also becomes unreasonably large at kinetic beam energies above few MeV. The Wien filter is commonly used as a spin rotator for polarized particle sources.

# **4.3 Siberian Snakes**

# *4.3.1 Main Properties of the Snakes*

The Siberian Snake (or the Full Snake) is a spin rotating device which rotates particle spin by 180◦ around some rotation axis (Fig. 4.5). The rotation axis is called the Snake axis and usually placed in horizontal plane. In the following we will consider only Snake with the Snake axis in the horizontal plane. The angle *αs* characterizing the orientation of the Snake axis in the horizontal plane is called the Snake axis angle. We will count the value of *αs* from the horizontal transverse axis.

For the Siberian Snake having the Snake axis in the horizontal plane the spinor matrix is written as:

$$M\_{sanke} = -i(\sigma\_1 \cos \alpha\_s + \sigma\_2 \sin \alpha\_s) \tag{4.22}$$

Following two relations are very useful when analyzing spin transformation properties of an accelerator ring with Full Snakes.

1. Relation 1:

$$M\_{snake} = \exp(-i\alpha\_s \sigma\_\\$) \cdot (-i\sigma\_\text{l})\tag{4.23}$$

This relation means that any Siberian Snake transformation can be presented as a rotation by 180◦ around horizontal axis, followed by the rotation by 2*αs* around vertical axis.

2. Relation 2:

$$V(\phi)M\_{snake} = M\_{snake}V(-\phi)\tag{4.24}$$

where *V (φ)* is the rotation about vertical axis by an angle *φ*:

$$V(\phi) = \exp(-i\sigma\_3 \frac{\phi}{2})\tag{4.25}$$

**Fig. 4.5** The spin transformation by a Siberian Snake

### 4 Rotators and Snakes 91

Deriving these relations by exercising the spinor math we leave for the homework (see Exercise 1 in the Sect. 4.6).

Original Siberian Snake concept was invented by Derbenev and Kondratenko [1]. As you will see in the following the Siberian Snakes can be applied for two purposes. First is for controlling a direction of beam polarization in a particular location. For this purpose one Siberian Snake can be used. The second purpose is to prevent depolarization caused by spin resonance crossings when accelerating a particle beam in an accelerator ring. For this purpose, two Snakes (or, in general even number of Snakes) are usually considered. The invention of the Siberian Snake concept opened a way for achieving highly polarized proton beams at the energies of tens of GeV and higher.

# *4.3.2 Case of One Snake*

We start with considering an accelerator ring with one Snake (Fig. 4.6). It is convenient to take the origin point of the ring azimuth in a ring location opposite to the Snake. Spin rotation in the arcs is described by the matrix *V* which represents rotation around vertical axis by *Gγ π*. To evaluate one turn matrix the Relation 2 can be used:

$$M\_{lurn} = V(G\gamma\pi)M\_{sank}V(G\gamma\pi) = M\_{sank}V(-G\gamma\pi)V(G\gamma\pi) = M\_{sank} \tag{4.26}$$

arriving to the conclusion that one turn spin transformation matrix is the Snake matrix.

**Fig. 4.6** The layout of a ring with one Snake

From here one can deduce the following properties for the accelerator ring with one Full Snake:


$$\nu\_{sp} = \frac{\mu}{2\pi} = \frac{\pi}{2\pi} = \frac{1}{2} \tag{4.27}$$

Thus, the spin tune remains at constant value 1*/*2 independently of the beam energy. This is a wonderful property which, as will be seen in following sections, is characteristic for accelerators with Full Snakes.

Main application of the single Snake configuration is related with producing the longitudinal polarization orientation for physics experiments. For this purpose, the Snake with longitudinal Snake axis has to be put at the ring azimuth opposite to the experimental detector. Such configuration was used in two electron accelerators, AmPS [2] in Amsterdam and the SHR ring [3] at MIT-Bates. They applied a single Siberian Snake to create the longitudinal polarization at the locations of internal targets.

The single Snake configuration can be also used for preventing depolarization during proton beam acceleration by avoiding spin resonance conditions, since the spin tune is held at fixed value 1*/*2. But having the stable spin vector in horizontal plane creates the coupling with horizontal betatron motion. Another inconvenience is that the vector **n**ˆ **<sup>0</sup>** has strong dependence on beam energy in the ring arcs. These issues can be resolved by using two Snakes.

# *4.3.3 Case of Two Snakes*

Now we consider an arrangement with two Snakes placed at opposite azimuths of the accelerator ring (Fig. 4.7). The Snake axis angles of these Snakes are *αs*<sup>1</sup> and *αs*2.

Again for the analysis of the 2-Snake configuration properties one needs to start with calculating one-turn spin transformation matrix. For the ring azimuth right after the first Snake, one turn matrix calculation, using on the way both Relations 1 and 2, leads to:

$$M\_{lurn} = M\_{snake1} V(G\gamma \pi) M\_{snake2} V(G\gamma \pi) = M\_{snake1} M\_{snake2} V(-G\gamma \pi) V(G\gamma \pi)$$

$$= M\_{snake1} M\_{snake2} = \exp(-i\alpha\_{s1}\sigma\_3) \cdot (-i\sigma\_1) \exp(-i\alpha\_{s2}\sigma\_3) \cdot (-i\sigma\_1)$$

$$= \exp(-i(\alpha\_{s1} - \alpha\_{s2})\sigma\_3)(-\sigma\_1^2) = \exp(-i(\alpha\_{s1} - \alpha\_{s2})\sigma\_3) \tag{4.28}$$

### 4 Rotators and Snakes 93

From the one turn spin transformation matrix *Mturn* one can get two characteristic properties of two Snake configuration:


$$\nu\_{sp} = \frac{2(\alpha\_{s1} - \alpha\_{s2})}{2\pi} = \frac{(\alpha\_{s1} - \alpha\_{s2})}{\pi} \tag{4.29}$$

For instance, to get the spin tune equal to 0.5, the Snake axes should be at 90◦ angle to each other. And unlike the case with one Snake per ring, the 2-Snake configuration allows for any choice of the spin tune, not only 0*.*5 value. It should be noted that the energy independence of the spin tune is due to Snake placement at the opposite ring azimuths. The homework Exercise 3 in the Sect. 4.6 considers the effect of the Snake axis and bending angle errors on the spin tune.

With the stable spin oriented vertically at all energies the 2-Snake configuration is a preferable solution for accelerating polarized beams through the spin resonances.This configuration was implemented in RHIC for accelerating polarized protons from 25 GeV to 255 GeV energy [4]. Each RHIC ring contains two Snakes placed in opposite ring azimuths to each other (Fig. 4.8). The Snake axes of RHIC Snakes were chosen to be at 45 and 135◦, that is symmetrical with respect to the longitudinal direction. According to (4.29) the spin tune is equal to 0*.*5 . Due to the Snakes polarized protons in RHIC have been accelerated to 255 GeV with minimal polarization loss. The polarization loss still happens due to high order resonances (so-called Snake resonances [5]). The resonance conditions for the Snake resonances are:

$$\nu\_{sp} = N + m \cdot \mathcal{Q}\_{\mathcal{Y}} + n \cdot \mathcal{Q}\_{\mathcal{X}} \tag{4.30}$$

**Fig. 4.8** The scheme of RHIC setup for polarization. Each ring contains two Siberian Snakes. In addition, the spin rotators are used around experimental detectors

where *N*, *m* and *n* are arbitrary integers. The Snake resonances must be avoided by proper control of the betatron tune and betatron coupling. The analysis of the Snake resonances is beyond the scope of this lecture, but if you are interested in getting more information on them the following papers are recommended: [5–7]. The homework Exercise 4 in the Sect. 4.6 considers the Snake resonance values and the number of resonances for different spin tunes.

# *4.3.4 Case of Multiple Snakes*

As the spin resonance strength increases with the beam energy, the increased number of Snakes may need to be employed in future high energy accelerators. Thus we consider the case of 2*N* Snakes distributed around the ring at azimuth *<sup>θ</sup>*1*, θ*2*,...,θ*2*<sup>N</sup>* <sup>=</sup> <sup>2</sup>*<sup>π</sup>* . Each Snake is characterized by its own Snake axis angle *αsi* and by the spin transformation matrix *Msn,i*. Between the Snakes the spin rotates

### 4 Rotators and Snakes 95

around vertical direction as the beam goes through the arcs which are presented by spin transformation matrices *Vθi,θi*−<sup>1</sup>

Calculation of one turn matrix is a nice homework exercise (see Exercise 2 in the Sect. 4.6). The result of the exercise is:

$$M\_{\rm Iurn} = M\_{\rm sn,2N} V\_{\theta\_{2N}, \theta\_{2N-1}} M\_{\rm sn,2N-1} V\_{\theta\_{2N-1}, \theta\_{2N-2}} \dots M\_{\rm sn,1} V\_{\theta\_1, \theta\_0}$$

$$= \dots$$

$$= V(\phi) = \exp(-i\sigma\_3 \frac{\phi}{2})\tag{4.31}$$

where the spin rotation angle *φ* depends on Snake location and Snake axis orientation:

$$\phi = G\gamma \sum\_{i=1}^{2N} (-1)^{i-1} (\theta\_i - \theta\_{i-1}) + 2 \sum\_{i=1}^{N} (\alpha\_{s,2i} - \alpha\_{s,2i-1}) \tag{4.32}$$

From here the spin tune then is obtained as:

$$\upsilon\_{sp} = \frac{G\nu}{2\pi} \sum\_{l=1}^{2N} (-1)^{l-1} (\theta\_l - \theta\_{l-1}) + \frac{1}{\pi} \sum\_{l=1}^{N} (\alpha\_{s,2l} - \alpha\_{s,2l-1}) \tag{4.33}$$

In order to avoid spin resonance conditions during beam acceleration one would want the spin tune to be independent of energy. The formula (4.33) shows that this can be achieved by allocating the Snakes around the ring so that the first term in (4.33) becomes 0. Then the spin tune value can be chosen by selecting proper orientations of Snake axes. Common approach is to have the spin tune at 0.5, providing maximum detuning from all first-order spin resonance conditions.

From (4.31) one can also deduce that the stable spin direction **n**ˆ **<sup>0</sup>** is vertical in all arcs. Each Snake switches **n**ˆ **<sup>0</sup>** direction from up to down, and vice versa.

Thus, with even number of Snakes one can maintain the vertical stable spin at all beam energies as well as have the spin resonances contained. If in locations of particle physics experiments a specific polarization orientation (often, longitudinal) is required, a pair of spin rotators can be installed, to convert the polarization orientation from the vertical to one required by the experiment, and then back to the vertical. This represents a general recipe for providing highly polarized beams at high energies for physics experiments.

# **4.4 Realization of Snakes and Spin Rotators**

# *4.4.1 Solenoidal Snake and Spin Rotator*

A Siberian Snake with longitudinal Snake axis can be simply constructed by using a solenoidal magnet. The required magnetic fields for 180◦ spin rotation are:

• For electrons:

$$B\_{sol} \cdot L = 10.47 \cdot p(\text{GeV}/c) \tag{4.34}$$

• For protons:

$$B\_{sol} \cdot L = \text{3.75} \cdot p(\text{GeV}/c) \tag{4.35}$$

A notable advantage of solenoidal Snake is that the beam closed orbit is not affected by the Snake. But the longitudinal magnetic field introduces a betatron coupling which, in most cases, would require compensation. Since required magnetic field increases with the particle energy the energy range for solenoid-based Full Snake applications is limited to below 10–20 GeV.

A solenoidal Snake was used in IUCF 500 MeV Cooler Ring for Siberian Snake proof-of-principle experiments (1989–1997) [8]. The IUCF Snake used 2 T·m solenoid. The experiments provided a first observation that depolarizing resonances were overcome by the Snake, confirming the main principle of the Snake. Highorder spin resonances, Snake resonances, have been also first observed during the IUCF Snake studies.

In following years the solenoidal Snakes were used in nuclear physics experiments in AmPS (Netherlands) [2] and MIT-Bates SHR (USA) [3] to create longitudinal polarization on internal targets. Beam energy in these accelerators was in 0.7–1 GeV range. For compensating betatron coupling the system of normal and skew-quadrupoles were incorporated into the solenoidal insertion as shown in Fig. 4.9. To make the Snakes as compact as possible the Snake solenoids were implemented as superconducting magnets.

A solenoidal magnet can be also used to realize a simple spin rotator. This is done by a combination of a solenoidal magnet and horizontally bending dipole. Spin transformation matrix for converting the vertical spin to longitudinal one is

### 4 Rotators and Snakes 97

very simple:

$$M\_{rot} = \exp(-i\pi\sigma\_3/4)\exp(-i\pi\sigma\_2/4) \tag{4.36}$$

It requires 90◦ spin rotation by the solenoid magnet accompanied by 90◦ spin rotation by the horizontal bend. Similar rotator can be used also in transfer lines to convert the longitudinal beam polarization produced in a polarized electron source to the vertical one. One deficiency of such rotator is that it works perfectly only at one particular energy.

In order to operate in wide energy range the rotator scheme must use more than one solenoidal insertion. For instance, a general electron rotator scheme for EIC has to cover energy rage 6–18 GeV. In this case to convert vertical spin to longitudinal at the experimental location at all required energies a combination of two solenoidal insertions and two horizontal bending sections can be used. The schematic of such rotator is shown in Fig. 4.10. After passing the experiment location a similar combination of solenoidal and dipole magnets is used to convert the spin back to the vertical.

The rotator system consideration using spin transformation matrices is a bit cumbersome in this case. But when one gets through it comes to the relations which define required solenoidal spin rotations *ϕi* as a function of spin rotation *ψ*<sup>1</sup> in dipole magnets:

$$\tan \varphi\_{\parallel} = \pm \frac{\cos \psi\_{2}}{\sqrt{-\cos(\psi\_{1} + \psi\_{2})\cos(\psi\_{1} - \psi\_{2})}} \tag{4.37}$$

$$\cos\varphi\_2 = \cot\psi\_1 \cot\psi\_2\tag{4.38}$$

From here the required solenoidal fields in all energy range can be found.

In order to properly integrate the solenoidal insertions into the electron ring lattice the optics of the solenoid insertion must satisfy two independent conditions:


**Fig. 4.10** The schematic layout of the electron spin rotator for EIC

Realization detail for such solenoidal insertion will be considered in the lecture on spin matching.

# *4.4.2 Siberian Snake and Spin Rotator Based on Dipole Magnets*

A Siberian Snake can be constructed using a sequence of alternating vertical (*V* ) and horizontal (*H*) bends, as shown in Fig. 4.11. Such design of the Siberian Snake was proposed by Steffen [9]. In more general form the Snake configuration can be written as:

$$(-H, -V, m \cdot H, 2V, -m \cdot H, -V, H).$$

here *m* is a number more than 1 [10]. The design uses a special field symmetry with respect to the Snake center:


Such symmetry makes the beam orbit restored at the Snake exit. It also results in the Snake axis lying in the horizontal plane. Then, by choosing fields of *H* and *V* bending magnets one can setup the required spin rotation angle (180◦ for the Full Snake) and a preferred direction of the Snake axis. Due to capability to select any Snake axis orientation such Snake configuration is called the *continuous axis Snake*.

From the analysis of the spin transformation matrix of this Snake one can derive that for getting 180◦ spin rotation the following relation connecting spin rotations in horizontal (*ψH* ) and vertical (*ψV* ) bends must be satisfied:

$$
\sin^2 \psi\_H \sin^2 \psi\_V = \frac{1}{2} \tag{4.39}
$$

Thus, this relation connects horizontal and vertical magnetic fields of the Snake magnets in order to realize the Full Snake. Using this relation and the Snake

**Fig. 4.11** The schematic layout of Steffen's Snake based on vertical and horizontal dipole magnets [6]

**Fig. 4.12** Dipole magnet Snake parameter plot defining the spin rotation in vertical bends required to get a particular Snake axis orientation [6]

parameter plot shown in Fig. 4.12 one can select any Snake axis orientation in the horizontal plane and find corresponding set of magnetic fields.

The Snakes based on dipole magnets have following characteristics properties. First, required fields scale inversely proportionally to particle velocity, thus for relativistic beams the magnetic fields very weakly depend on the beam energy. Second, the orbit excursion changes inversely proportionally to the particle energy. And, at last, the required integrated magnetic field is generally in the range 15– 35 T · m, depending on the orientation of the Snake axis. Therefore this type of Snake is preferred at the high beam energy.

Unlike the Snake based on solenoidal magnets in the dipole magnet Snake the beam orbit makes excursion inside the Snake. Below 20 GeV the orbit excursion reaches tens of centimeters. But at the energies above 20 GeV the orbit excursion becomes reasonable. And while the required field of solenoidal Snake increases with the beam energy, the field of the dipole-based Snake is nearly constant at high energies. Thus, the Snake based on dipole magnets would be a good choice at the beam energies above 20 GeV.

The spin rotators based on dipole magnets were used in HERA [11]. HERA was the first e-p collider, operated with 27.5 GeV electrons and 920 GeV protons. The spin rotators were implemented for electron beam to produce longitudinal polarization at the experimental detectors. To this day it is the highest energy application of the spin rotators in electron accelerators. The HERA rotator was a sequence of three horizontal and three vertical bending magnets:

$$(V3, H3, V2, H2, V2, H1).$$

Since the vertical orbit needs to be restored the fields of vertical bending magnets are connected by the relation:

$$V\mathfrak{J} = -(V1 + V2)\tag{4.40}$$

Since the HERA spin rotators were for electron beam the rotator optics had to be designed to satisfy the spin matching conditions (see the lecture on spin matching). The vertical orbit excursion characteristic for rotators based on dipole magnets was addressed by placing some magnets off the horizontal plane to keep them centered on the beam orbit. But changing polarization direction at the experiments was challenging, since it required moving the magnets vertically to maintain the magnet alignment on the beam orbit.

# *4.4.3 Siberian Snake and Spin Rotator Based on Helical Magnets*

The Siberian Snake can be created with four full twist helical dipole magnets, having vertically oriented field at the entrance of each helix [12]. Each magnet is characterized by the strength of magnetic field on the magnet axis *Bi*, the helical twist helicity *Ri* and the number of helical periods *Ni*. Similar to the continuous axis Snake based on dipole magnets one can identify symmetry conditions which automatically provide the beam orbit restoration and the Snake axis being in the horizontal plane. The symmetry conditions in the case of the helical magnets can be written by relating fields, helicities and numbers of helical periods of different Snake magnets:

*<sup>B</sup>*<sup>1</sup> = −*B*4; *<sup>B</sup>*<sup>2</sup> = −*B*3; *<sup>R</sup>*<sup>1</sup> <sup>=</sup> *<sup>R</sup>*4; *<sup>R</sup>*<sup>2</sup> <sup>=</sup> *<sup>R</sup>*3; *<sup>N</sup>*<sup>1</sup> <sup>=</sup> *<sup>N</sup>*4; *<sup>N</sup>*<sup>2</sup> <sup>=</sup> *<sup>N</sup>*3*.* (4.41)

These conditions define the continuous axis helical Snake.

The Siberian Snakes based on the helical magnets have been implemented in collider RHIC in Brookhaven National Laboratory. In the RHIC Snake each helical magnet has one helical period. Fields of the Snake magnets can be found from the parameter plot that is obtained from the Snake spin transformation matrix. Figure 4.13 shows the parameter plot for RHIC Snake [4]. µ is the spin rotation angle. For the Full Snake <sup>µ</sup> <sup>=</sup> <sup>180</sup>◦ is needed (green curve). *αs* is the Snake axis angle. (On this plot it is accounted from the longitudinal axis!). From this plot one can find helical fields *(B*1*, B*2*)* required to achieve given µ and *αs*. Natural choice,

**Fig. 4.13** Parameter plot defining the magnet strength of helical magnets for the RHIC Snake [4]

applied in RHIC is to have one Snake axis at +45◦ with other Snake axis oriented at −45◦ with respect to longitudinal axis. Blue circles show possible parameter points for the 45◦ Snake axis.

Figure 4.14 shows spin and orbit evolution through RHIC helical Snake at the injection energy (*<sup>γ</sup>* <sup>=</sup> 25). Since the orbit excursion reduces inversely proportionally to beam energy at the store energy (*<sup>γ</sup>* <sup>=</sup> 270) the maximum orbit deviation is just a couple of millimeters. Comparing the helical Snake with a Steffen Snake of similar total length one gets smaller resulting orbit excursion in the helical Snake. Some disadvantage of using helical magnets is related with the fact that their field is intrinsically non-linear. Because of this the effects of such spin rotators on particle dynamics has to be carefully considered. That includes betatron tune shifts and beta-function distortions induced by the helical Snakes. The homework Exercise 5 in the Sect. 4.6 compares several design options for the helical Siberian Snakes.

The sequence of the four helical magnets can also be used to realize a spin rotator for transforming the vertical polarization at the rotator entrance into longitudinal polarization in the location of experimental detector. It was shown that most efficient scheme was one based on the helical magnets having horizontal field orientation at the magnet entrance [12]. Helical spin rotators were implemented in RHIC.

Stronger magnetic field makes the spin rotator or the Snake more compact and minimizes the beam orbit excursions inside the rotators. Because of this, supercon-

**Fig. 4.14** Spin and orbit trajectories in RHIC helical Snake at *<sup>γ</sup>* <sup>=</sup> <sup>25</sup> [4]

ducting magnet technology, using NbTi superconductor, has been used for building 4 T helical magnets for RHIC Snakes and spin rotators. Figure 4.15 shows the cross-sections of the helical magnets of RHIC spin rotators. The superconducting coil is surrounded by the iron collar. All magnet elements are cooled to 4.2 K by using liquid He. Since the orbit excursion gets larger at lower energies, the magnet aperture is defined at low energies. For instance, for RHIC the magnet aperture must be large enough to accommodate sufficiently large orbit excursion (∼2 cm) at RHIC injection energy 25 GeV.

# **4.5 Summary**

Various types of spin rotating devices can be used in accelerator rings for different purposes. Among them the Siberian Snake represents an amazing device allowing polarization preservation when crossing numerous spin resonances during beam acceleration. Most efficient use of Snakes is in pairs (even number), with proper distribution of an accelerator ring. Proper selection of the Snake axis angle ensures spin tune 0*.*5. Even with Snakes one needs to be careful about depolarization, since there are higher order resonances, Snake resonances. And larger beam energies require larger number of the Snake pairs. Spin rotators also play very important role in accelerators which require longitudinally polarized beam at experimental detectors. Practical realization of Snakes and rotators depends on the energy of a particular accelerator. Dipole and helical dipole-based Snakes would be a proper choice at higher energies (>20 GeV); while solenoidal based Snakes more appropriate at lower energies (<20 GeV).

# **4.6 Homework Exercises**

In this section several exercises referred throughout this Chapter are given together with their solutions.

# • **? Exercise 1**

A general spinor transformation matrix has the form:

$$M = \exp[-i(\sigma \cdot \mathbf{b})\frac{\varphi}{2}] = I\cos(\varphi/2) - i(\sigma \cdot \mathbf{b})\sin(\varphi/2) \tag{4.42}$$

where *ϕ* is the spin rotation angle and **b** is the rotation axis unit vector.

The matrix of the Siberian Snake with the Snake axis angle *αs* is:

$$M\_{snake} = -i(\sigma\_1 \cos \alpha\_s + \sigma\_2 \sin \alpha\_s) \tag{4.43}$$

And the matrix of spin rotation in the ring arcs, where the spin rotates around the vertical guiding magnetic field of dipole magnets is:

$$V(\phi) = \exp[-i(\sigma\_3 \frac{\phi}{2})] = I\cos(\phi/2) - i(\sigma\_3 \sin(\phi/2))\tag{4.44}$$

where *<sup>φ</sup>* <sup>=</sup> *Gγ θ* and *<sup>θ</sup>* is the arc bending angle.

Then, first, prove that the Snake matrix can be presented as the product of two consecutive rotations (around horizontal and vertical axes):

$$M\_{sanke} = \exp(-i\alpha\_s \sigma\_\\$) \cdot (-i\sigma\_\text{l})\tag{4.45}$$

Second, prove the relation between arc and Snake matrices

$$V(\phi)M\_{sanke} = M\_{sanke}V(-\phi)$$

### **Solution**

Please note, that there are different ways to prove these relations. Only one possible way is shown, as an example.

For proving the relation:

$$M\_{sanke} = \exp(-i\alpha\_s \sigma\_\\$) \cdot (-i\sigma\_\lnot\,)\tag{4.46}$$

one could use the following properties of *σ* matrices:

*<sup>σ</sup>*1*σ*<sup>1</sup> <sup>=</sup> *I, σ*2*σ*<sup>1</sup> = −*iσ*<sup>3</sup> (4.47)

To prove the first relation one can follow this path:

$$M\_{s\text{n}ake} = -i(\sigma\_1 \cos \alpha\_s + \sigma\_2 \sin \alpha\_s) = -i(\sigma\_1 \cos \alpha\_s + \sigma\_2 \sigma\_1^2 \sin \alpha\_s)$$

$$= (\cos \alpha\_s + \sigma\_2 \sigma\_1 \sin \alpha\_s)(-i\sigma\_1) = (\cos \alpha\_s - i\sigma\_3 \sin \alpha\_s)(-i\sigma\_1)$$

$$= \exp(-i\alpha\_s \sigma\_3)(-i\sigma\_1) \tag{4.48}$$

### 4 Rotators and Snakes 105

For proving the relation:

$$V(\phi)M\_{snake} = M\_{snake}V(-\phi)$$

one could use the following properties of *σ* matrices:

$$
\sigma\_3 \sigma\_\mathbb{I} = -\sigma\_\mathbb{I} \sigma\_\mathbb{3}, \qquad \sigma\_3 \sigma\_\mathbb{2} = -\sigma\_\mathbb{2} \sigma\_\mathbb{3} \tag{4.49}
$$

Then this relation can be proved in following way:

$$V(\phi)M\_{snake} = (I\cos(\phi/2) - i\sigma\_3\sin(\phi/2)) \cdot (-i)(\sigma\_1\cos\alpha\_s + \sigma\_2\sin\alpha\_s)$$

$$= (-i)[I\cos(\phi/2)(\sigma\_1\cos\alpha\_s + \sigma\_2\sin\alpha\_s) - $$

$$-i\sin(\phi/2)(\sigma\_3\sigma\_1\cos\alpha\_s + \sigma\_3\sigma\_2\sin\alpha\_s)] = $$

$$= (-i)[(\sigma\_1\cos\alpha\_s + \sigma\_2\sin\alpha\_s) \cdot I\cos(\phi/2) + $$

$$+ i(\sigma\_1\sigma\_3\cos\alpha\_s + \sigma\_2\sigma\_3\sin\alpha\_s)\sin(\phi/2)] = $$

$$= (-i)(\sigma\_1\cos\alpha\_s + \sigma\_2\sin\alpha\_s) \cdot (I\cos(\phi/2) + i\sigma\_3\sin(\phi/2)) = $$

$$= M\_{snake}V^{-1}(\phi) = M\_{snake}V(-\phi) \tag{4.50}$$

# • **? Exercise 2**

Consider a system of 2N Siberian Snakes placed at the azimuths *θ*1*, θ*2*,...,θ*2*<sup>N</sup>* in an accelerator ring. Each Snake is characterized by its own Snake axis angle *αs,i*.

Show that the one turn matrix is the matrix of the spin rotation around the vertical axis and confirm the spin tune expression (4.33):

$$M\_{\rm turn} = M\_{\rm sn, 2N} V\_{\theta\_{2N}, \theta\_{2N-1}} M\_{\rm sn, 2N-1} V\_{\theta\_{2N-1}, \theta\_{2N-2}} \dots M\_{\rm sn, 1} V\_{\theta\_1, \theta\_0}$$

$$= \dots$$

$$= V(\phi) = \exp(-i\sigma \frac{\phi}{2}) \tag{4.51}$$

and

$$\phi = G\gamma \sum\_{l=1}^{2N} (-1)^{l-1} (\theta\_l - \theta\_{l-1}) + 2 \sum\_{l=1}^{N} (\alpha\_{s,2l} - \alpha\_{s,2l-1}) \tag{4.52}$$

### **Solution**

Please note that there might be different ways to prove this relation. Only one possible way is shown, as an example.

Let's note first that *Vθi,θi*−<sup>1</sup> <sup>=</sup> *V (Gγ (θi* <sup>−</sup> *θi*−1*))* Then, using the relation *V (φ)Msnake* <sup>=</sup> *MsnakeV (*−*φ)* one can consecutively exchange positions of Snake matrices

$$M\_{4mn} = M\_{3n,2N} V(G\gamma(\theta\_{2N} - \theta\_{2N-1})) M\_{3n,2N-1} V(G\gamma(\theta\_{2N-1} - \theta\_{2N-2})) \dots$$

$$\dots M\_{sn,1} V(G\gamma(\theta\_1 - \theta\_0)) =$$

$$= V(G\gamma(\theta\_{2N-1} - \theta\_{2N})) V(G\gamma(\theta\_{2N-1} - \theta\_{2N-2})) \dots$$

$$\dots \quad V(G\gamma(\theta\_1 - \theta\_0)) M\_{sn,2N} M\_{sn,2N-1} \dots M\_{sn,1} =$$

$$= V(G\gamma[(\theta\_{2N-1} - \theta\_{2N}) + (\theta\_{2N-1} - \theta\_{2N-2}) + \dots \ . \tag{4.51}$$

$$\dots \quad + (\theta\_1 - \theta\_0)] M\_{sn,2N} M\_{sn,2N-1} \dots M\_{sn,1} =$$

$$= V(\varphi\_1) M\_{sn,2N} M\_{sn,2N-1} \dots M\_{sn,1} \tag{4.53}$$

where

$$\varphi\_l = G\gamma \sum\_{i=1}^{2N} (-1)^{i-1} (\theta\_l - \theta\_{l-1}) \tag{4.54}$$

On next step we transform the product of the Snake matrices:

$$M\_{sn,2N}M\_{sn,2N-1}\dots M\_{sn,1} = \exp(-i\alpha\_{s,2N}\sigma\_3)(-i\sigma\_1)\exp(-i\alpha\_{s,2N-1}\sigma\_3)(-i\sigma\_1)$$

$$\dots \exp(-i\alpha\_{s,1}\sigma\_3)(-i\sigma\_1) =$$

$$= \exp(-i\alpha\_{s,2N}\sigma\_3)\exp(i\alpha\_{s,2N-1}\dots\dots)$$

$$\dots \exp(-i\alpha\_{s,1}(-i\sigma\_1)(-i\sigma\_1)\dots(-i\sigma\_1) =$$

$$= \exp(-i(\alpha\_{s,2N} - \alpha\_{s,2N-1} + \dots + \alpha\_{s,1})\sigma\_3)(-i\sigma\_1)^{2N}$$

$$= V(\varphi\_2)(-1)^N \tag{4.55}$$

where

$$\varphi\_2 = 2\sum\_{l=1}^{N} (\alpha\_{s,2l} - \alpha\_{s,2l-1})\tag{4.56}$$

Finally:

$$M\_{\rm Iurn} = V(\varphi\_1) M\_{\rm sn, 2N} M\_{\rm sn, 2N-1} \dots M\_{\rm sn, 1} = (-1)^N V(\varphi\_1) V(\varphi\_2) = $$

$$= (-1)^N V(\varphi\_1 + \varphi\_2) = V(\phi) \tag{4.57}$$

### 4 Rotators and Snakes 107

where

$$\phi = \varphi\_1 + \varphi\_2 = G\gamma \sum\_{l=1}^{2N} (-1)^{l-1} (\theta\_l - \theta\_{l-1}) + 2 \sum\_{l=1}^{N} (\alpha\_{s,2l} - \alpha\_{s,2l-1}) \tag{4.58}$$

Note, that factor *(*−1*)<sup>N</sup>* in Eq. (4.57) can be dropped out since it increments *<sup>φ</sup>* by 2*π*.

# • **? Exercise 3**

Consider a system of two Full Snakes separated precisely by 180◦ bending angle. The Snake axes are chosen such that *αs,*<sup>2</sup> <sup>−</sup> *αs,*<sup>1</sup> <sup>=</sup> *π/*2, so the spin tune is equal to one half.


### **Solution**

One can use the expression (4.33) for spin tune in the system with 2*N* Snakes. With only 2 Snakes the expression reads as:

$$\upsilon\_{sp} = \frac{G\underline{\chi}}{2\pi} [(\theta\_1 - \theta\_2) + (\theta\_1 - \theta\_0)] + \frac{1}{\pi} (\alpha\_{s,2} - \alpha\_{s,1}) = $$

$$= \frac{G\underline{\chi}}{\pi} (\theta\_1 - \pi) + \frac{1}{\pi} (\alpha\_{s,2} - \alpha\_{s,1}) \tag{4.59}$$

since *<sup>θ</sup>*<sup>0</sup> <sup>=</sup> <sup>0</sup> and *<sup>θ</sup>*<sup>2</sup> <sup>=</sup> <sup>2</sup>*π*.

For perfectly placed Snakes (*θ*<sup>1</sup> <sup>=</sup> *<sup>π</sup>*) and with *αs,*<sup>2</sup> <sup>−</sup> *αs,*<sup>1</sup> <sup>=</sup> *π/*<sup>2</sup> the spin tune is *νsp* <sup>=</sup> <sup>1</sup>*/*2.

1. Let's consider that one of the Snake axis (say, *αs,*1) is shifted by *δαs,*1. Corresponding change in the spin tune can be written as:

$$\nu\_{sp} = \frac{1}{\pi} (\pi/2 - \delta \alpha\_{s,1}) \tag{4.60}$$

Thus the spin tune shift is

$$
\delta\upsilon\_{sp} = -\frac{1}{\pi}\delta\alpha\_{s,1} \tag{4.61}
$$

From here, in order to have the spin tune shift less than 0.1, <sup>|</sup>*δαs,*1<sup>|</sup> has to be less than <sup>0</sup>*.*1*π*. That is the tolerance on <sup>|</sup>*δαs,*1<sup>|</sup> is 0.314 rad (or 18◦).

2. Now let's consider that there is an error *δθ* in the bending angle between the Snakes. That is *<sup>θ</sup>*<sup>1</sup> <sup>=</sup> *<sup>π</sup>* <sup>+</sup> *δθ* The spin tune becomes

$$\upsilon\_{sp} = \frac{G\underline{\gamma}}{\pi}(\delta\theta) + 1/2. \tag{4.62}$$

For protons *<sup>G</sup>* <sup>=</sup> <sup>1</sup>*.*79. Relativistic factor *<sup>γ</sup>* <sup>=</sup> <sup>255</sup>*.*<sup>8</sup> for 240 GeV, and *<sup>γ</sup>* <sup>=</sup> <sup>266</sup>*.*<sup>5</sup> for 250 GeV.

Then from the Eq. (4.62 ) the spin tune shifts corresponding to 0*.*1◦ bending angle error can be calculated to be 0*.*254 at 240 GeV and 0*.*265 at 250 GeV, changing linearly with the beam energy between these two energies.

# • **? Exercise 4**

Consider system of two Full Snakes separated by 180◦ bending angle. The Snake axes are chosen such that *αs,*<sup>2</sup> <sup>−</sup> *αs,*<sup>1</sup> <sup>=</sup> *π/*2. Spin tune for such system is 0.5.

Calculate vertical betatron tune values corresponding to the resonance conditions of 2nd, 3rd and 4th order spin resonances.

Next, consider that Snake axes were retuned to get the spin tune 0.25. Find the required orientation of the Snake axes and calculate vertical betatron tune values corresponding to the locations of 2nd, 3rd and 4th order spin resonances.

How does the number of the resonances compare in two cases?

### **Solution**

The general condition of the spin resonance between the spin tune *νsp* and vertical betatron tune *Qy* is :

$$
\nu\_{sp} = N + m \,\mathcal{Q}\_{\mathcal{Y}} \,\tag{4.63}
$$

where *N* and *m* are arbitrary integer numbers. Absolute value of *m* defines the order of the resonance.

Let's present *Qy* as *Qy* = [*Qy*]+{*Qy*} where [*Qy* ] is the integer part of the vertical betatron tune, and {*Qy* } is the fractional part, which is between 0 and 1. For the fractional part of vertical betatron tune, using the Eq. (4.63) one gets:

$$\{\mathcal{Q}\_{\mathcal{Y}}\} = \frac{\upsilon\_{sp} - N - m\{\mathcal{Q}\_{\mathcal{Y}}\}}{m} \tag{4.64}$$

### 4 Rotators and Snakes 109

If the spin tune is equal to 1*/*2, then resonance condition becomes:

$$\{\mathcal{Q}\_{\mathcal{Y}}\} = \frac{1 - 2N - 2m\{\mathcal{Q}\_{\mathcal{Y}}\}}{2m} = \frac{1 + 2 \ast \tilde{N}}{2m} \tag{4.65}$$

where *<sup>N</sup>*˜ is an arbitrary integer which gives {*Qy*} between 0 and 1. From here the following table of high-order spin resonance values of {*Qy* } can be compiled:


Now let's take the spin tune equal to 1*/*4. As follows from the formula (4.29), to obtain this spin tune the Snake axis angles have to be in the relations:

$$
\alpha\_{s,2} - \alpha\_{s,1} = \pi/4\tag{4.66}
$$

The spin resonance condition in this case becomes:

$$\{Q\_{\mathbf{y}}\} = \frac{1 - 4N - 4m[Q\_{\mathbf{y}}]}{4m} = \frac{1 + 4 \ast \tilde{N}}{4m} \tag{4.67}$$

where *<sup>N</sup>*˜ is again an arbitrary integer which gives {*Qy* } between 0 and 1. Then one gets the following table of high-order spin resonance values of {*Qy*}:


Comparing the results for *νsp* <sup>=</sup> <sup>1</sup>*/*<sup>2</sup> and *νsp* <sup>=</sup> <sup>1</sup>*/*<sup>4</sup> one can note that, beside different resonance locations, the total number of resonances of any order is twice smaller in the case of *νsp* <sup>=</sup> <sup>1</sup>*/*2. It happens because with *νsp* <sup>=</sup> <sup>1</sup>*/*<sup>2</sup> high-order resonances are paired together. This can be considered as one of advantages of using *νsp* <sup>=</sup> <sup>1</sup>*/*2, since it provides a cleaner working point space for choosing the betatron tune.

# • **? Exercise 5**

One needs to design a continuous axis Siberian Snake for a proton accelerator ring based on helical dipole modules. Three schemes have been proposed, which are summarized in the table:


All Snakes use helical magnets with twist period 2*.*4 m. *N* characterizes a number of helical twist periods in each magnet. Using the formula (4.14) for the orbit shift on one twist period, find the maximum orbit excursion inside each Snake design scheme at *<sup>E</sup>* <sup>=</sup> <sup>25</sup> GeV. Also, calculate the absolute total field integral for each design option. On the basis of these calculations and, may be, other considerations select a design scheme which you would recommend for the accelerator ring.

### **Solution**

From the orbit shift formula (4.14) one gets for the orbit shift on one helical period:

$$
\Delta \mathbf{y} = 2\pi R r = \frac{2\pi R B\_0 c}{k^2 \beta} \frac{e}{E} = \frac{\lambda^2 R B\_0 c}{2\pi \beta} \frac{e}{E} \tag{4.68}
$$

For 25 GeV one then obtains:

$$\Delta\text{y} (\text{mm}) \approx 1 \, 1.0 \, \ast \, R \, \ast \, B\_0(T) \tag{4.69}$$

Then using values of *B*0, *R* and *N* for three design options one can calculate *y* and *y* after each helix:


From there the maximum orbit excursion and the absolute field integral for every scheme can be summarized as:

The Scheme 3 demonstrates smaller orbit excursion and smaller field integral than other two schemes. However, it does not satisfy symmetry conditions for field

### 4 Rotators and Snakes 111


and twist helicities, required for the continuous axis Snake (4.41). Thus, the Scheme 2 would be a preferable choice. In fact, the Scheme 2 was realized at RHIC.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 5 Polarization Preservation and Spin Manipulation**

113

### **Haixin Huang**

**Abstract** In this chapter, we will discuss how the polarization is preserved with real accelerators, including both electrons and protons. In the end, we also present a few examples of spin manipulations.

# **5.1 Introduction**

Before we start, first let us summarize what we have learned so far:

As we learned from previous chapters, spin motion in external electromagnetic fields is governed by Thomas-BMT equation. Spin motion in a synchrotron can be treated with spinors in the form of one-turn matrix of spin. In periodic accelerator structures, spin motion is periodic, which results in the spin tune concept. Because of the periodicity, the spin precession experiences resonant motions. These resonances can be divided into a few categories: imperfection resonances, intrinsic resonances, synchrotron side band resonances, etc. The resonance strength is a function of energy (*Gγ* ), the lattice used (betatron tunes, beta functions), the magnitudes of field errors and orbit errors. They can be calculated with Fourier analysis, by programs such as DEPOL [1]. For an isolated resonance, the final spin can be determined from the initial spin by the crossing speed *α* and the resonance strength , using the

H. Huang (-)

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Collider Accelerator, Brookhaven National Laboratory, Upton, NY, USA e-mail: huanghai@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_5

Froissart-Stora formula [2]. The depolarizing resonance is different from betatron resonances where stronger resonances cause more damage. When the adiabatic condition is satisfied, <sup>|</sup><sup>|</sup> 2 *α* - 1, polarization amplitude can be preserved, by a full spin flip.

A beam bunch is composed of particles with different betatron amplitudes and phases. For an intrinsic resonance, the Froissart-Stora formula needs to be applied to an ensemble of particles with a certain distribution. The most common distribution is Gaussian distribution. Let *ε* be the Courant invariant of a particle and the distribution function be *ρ(ε)*. The polarization of the beam after passing through an isolated resonance is given by:

$$ = \int\_0^\infty (2e^{\frac{-\pi|\epsilon(\varepsilon)|^2}{2a}} - 1)\rho(\varepsilon)d\varepsilon, \quad \rho(\varepsilon) = \frac{1}{2\varepsilon\_0}e^{-\varepsilon/2\varepsilon\_0}.\tag{5.1}$$

Using the fact that the intrinsic resonance strength is proportional to the square of the particle emittance,

$$\left|\epsilon(\varepsilon)\right|^2 = \left|\epsilon(\varepsilon\_0)\right|^2 \frac{\varepsilon}{\varepsilon\_0} \tag{5.2}$$

With these conditions, the Froissart-Stora formula for a beam with Gaussian distribution is given as

$$P\_f / P\_l = \frac{1 - \frac{\pi \epsilon^2}{\alpha}}{1 + \frac{\pi \epsilon^2}{\alpha}}.\tag{5.3}$$

It should be noted that Froissart-Stora formula can only be applied to isolated resonances. The isolated resonance has to satisfy following condition: the distance *δ* between resonances (assume respective strengths 1*,* 2) is much larger than the resonance strengths. Namely: *<sup>δ</sup>* max*(*1*,* 2*)*.

From the Froissart-Stora formula, depending on the resonance strength, there are two ways to preserve polarization through a depolarizing resonance. Very fast crossing applies when *<sup>π</sup>*|<sup>|</sup> <sup>2</sup>*/(*2*α)* 1, which will result in *Pf /Pi* <sup>→</sup> 1. The adiabatic condition applies when *<sup>π</sup>*|<sup>|</sup> <sup>2</sup>*/(*2*α)* - 1, which will result in *Pf /Pi* <sup>→</sup> −1.

To maintain the polarization through a resonance, one of two things should happen:


In almost all cases we will discuss in this chapter, the isolated resonance condition is satisfied.

# **5.2 Overcome Resonances by Reducing Their Effects**

This section reviews various techniques used to overcome depolarizing resonances by reducing their effects.

# *5.2.1 Harmonic Orbit Correction*

Since the imperfection resonance strength is proportional to the error harmonic of the closed orbit (Sect. 2.3.5.1), by introducing the specific vertical harmonic orbit correction, the resonance can be compensated so that the total resonance strength is either zero or strong enough to fully flip the spin. This method has been used by many accelerators such as Brookhaven AGS [3], KEK [4], KEK Booster [4], Saturne [5] and COSY [6]. There are drawbacks of this method. It is tedious, and the optimal setting could change with time and the tuning of the ring has to be redone. This is a problem if many resonances need to be corrected.

Consider the AGS Booster as an example. In the AGS Booster, the polarized proton beam comes in at *Gγ* <sup>=</sup> <sup>2</sup>*.*<sup>18</sup> and normally is extracted at *Gγ* <sup>=</sup> <sup>4</sup>*.*5. The vertical tune is set at 4.9 to avoid the intrinsic resonance at <sup>0</sup> <sup>+</sup> *νy* in the Booster. There are two imperfection resonances in the energy range at *Gγ* <sup>=</sup> <sup>3</sup> and 4. They both are corrected by the harmonic correction: *Gγ* <sup>=</sup> <sup>3</sup> resonance is corrected by compensating the resonance strength to zero and *Gγ* <sup>=</sup> <sup>4</sup> resonance is corrected by introducing a full spin flip with strong harmonic orbit component. In the case of *Gγ* <sup>=</sup> 4, the resonance strength is enhanced instead. This is possible because *Gγ* <sup>=</sup> <sup>4</sup> resonance itself is strong enough that a modest corrector strength can enhance it to get a full spin flip.

For a given corrector current, the effective resonance strength is the combination of both the original imperfection resonance and the corrector resonance strengths. Namely, the Froissart-Stora formula takes the form

$$P\_f = P\_l(2\exp[\frac{-\pi|\epsilon\_1 - \epsilon\_2|^2}{2\alpha}] - 1),\tag{5.4}$$

where <sup>1</sup> and <sup>2</sup> are the resonance strengths of the original imperfection resonance and the one introduced by the correctors. The resonance strength is a complex number, it has real and imaginary parts or two orthogonal components: cosine and sine (Eq.(2.29)). At proper current of the two orthogonal components, the effective resonance strength is zero and polarization is fully preserved in this case. Since we are going to scan the corrector current, we rewrite the above formula in a slightly different form:

$$P\_f = P\_l(\mathcal{Q}\,e^{\frac{-\pi\left(l\_l - l\_{s0}\right)^2}{2\sigma\_s^2}}\,e^{\frac{-\pi\left(l\_c - l\_{c0}\right)^2}{2\sigma\_c^2}} - 1),\tag{5.5}$$

where *Is* (*Ic*) is the corrector current for sine (cosine) component, *Is*<sup>0</sup> (*Ic*0) is the sine (cosine) corrector current corresponding to the optimized polarization, and *σs* (*σc*) will provide the width of the sine (cosine) current scan, or sensitivity of the current variation. During the current scan, only one component, either *Ic* or *Is*, is varied. The other component needs to be set as a constant. In other words, the fitting is done with the following format for cosine and sine components separately:

$$P\_f = p\_0(2e^{\frac{-\pi(l-p\_1)^2}{2p\_2^2}} - p\_3),\tag{5.6}$$

where *p*0, *p*1, *p*<sup>2</sup> and *p*<sup>3</sup> are the fitting parameters. For the cosine component scan,

$$p\_0 = P\_l \exp\frac{-\pi \left(I\_s - I\_{s0}\right)^2}{2\sigma\_s^2},$$

$$I - p\_1 = I\_c - I\_{c0},$$

$$p\_2 = \sigma\_c,$$

$$p\_3 = 1/\exp[\frac{-\pi \left(I\_s - I\_{s0}\right)^2}{2\sigma\_s^2}]\tag{5.7}$$

The terms related to the sine component are absorbed into the fitting parameters.

Exercise 2 (Sect. 5.6) addresses the matching of experimental data using Eq.(5.6).

# *5.2.2 Speedup the Crossing Speed*

The crossing speed can be increased in several ways. The maximum acceleration rate for a beam in a synchrotron is usually set by engineering limits on the maximum achievable ramp rate of the main dipole current and field, so typically increasing the acceleration rate is not an option. The options to increase the crossing speed include rapidly changing betatron tunes over one or a few orbit turns (tune jump); changing radius rapidly while keeping main magnet field constant (radial jump). A complete resonance crossing speed is given in the presence of tune jump:

$$
\alpha = G \frac{d\boldsymbol{\gamma}}{d\theta} \pm \frac{d\boldsymbol{\upsilon}}{d\theta} \tag{5.8}
$$

The crossing speed can be changed by acceleration speed, radial shift (RF manœuver) and rapid tune jump.

# *5.2.3 Radial Jump*

In the case that magnet ramping speed is limited but the RF system is powerful enough, the energy can be quickly changed by shifting the radius while maintaining the main magnet field constant. It is called energy-jump method. An experiment was carried out at the AGS to demonstrate the idea [7]. In the presence of a solenoidal partial snake, a strong coupling is introduced, which in turn generates coupling resonances. The energy jump method was used to cross the coupling resonance near intrinsic resonance <sup>0</sup> <sup>+</sup> *νy* , at <sup>0</sup> <sup>+</sup> *νx* (a horizontal resonance which is excited in the presence of solenoidal partial snake). The energy-jump was accomplished by rapidly changing the beam circumference by 88 mm using the powerful AGS RF system over 40 turns. Due to the momentum spread, not all the beam particles are crossing the resonance during the jump unless the jump timing is centered. The polarization was measured as function of the jump time *Tjump*. As shown in Fig. 5.1, the final polarization is optimized when the jump time is centered at the resonance <sup>0</sup> <sup>+</sup> *νx*.

# *5.2.4 Tune Jump (Both Fast and Benign)*

The tune jump can be achieved by using pulsed quadrupoles to rapidly shift the tune and thus make the resonance crossing rate *α* very large. This method has been applied in AGS [3], KEK, KEK Booster[4], COSY[8] and other accelerators. The mechanism of the tune jump is illustrated in Fig. 5.2.

In the AGS, the rapid tune shifts were produced by special fast quadrupole magnets; ten quadrupoles were installed in ten of the twelve superperiods. Sophisticated power supplies, which generated pulses with a maximum output of 2250 A at 15 000 V, were connected to 10 of these quadrupoles. The field in each fast quadrupole had a 1.6µs rise time and then decayed back to zero in about 3 ms. Each quadrupole had a maximum field gradient of 11.7 kG/m. The AGS revolution time is in the order of 3µs, and this fast tune jump is a one turn tune jump. It can generate a tune jump in the order of 0.2 unit in one orbit turn. One example of the tune jump effect on polarization is shown in Fig. 5.3. When the jump timing is centered at the intrinsic resonance, the polarization is maximized. The plateau of polarization means there is a tolerance of 0.1 GeV/c for the jump timing.

The major problem of the fast tune jump is the emittance growth due to the large and fast tune jump: non-adiabatic excitation of quadrupoles will generate emittance growth due to the non-adiabatic excitation of closed orbit and the non-adiabatic betatron amplitude mismatch. This is especially true if the center of the closed orbit does not coincide with the center of the tune jump quadrupoles. Closed orbit oscillations arising from the non-adiabatic dipole fields in tune jump quadrupoles will generate emittance growth. Efforts were made to center tune jump quadrupoles in the AGS and the emittance growth was greatly reduced [9]. Experimental tests in

**Fig. 5.1** Radial jump scheme and polarization gain with the jump. The hash lines represent the beam with a certain momentum spread

1990s showed that the single turn tune jump can be further relaxed to multiple turns (20–30 turns). The emittance growth in this case is further reduced [7].

These tune jump quadrupoles eventually were removed from AGS after AGS polarization preservation switched to strong partial snakes (see below). However, a new type of resonance, so-called horizontal intrinsic resonances [10], gives this method a new life. In the presence of strong partial snakes, the stable spin direction is not vertical. Therefore the perturbing fields that rotate the spin away from the stable direction have vertical as well as horizontal components. Particles undergoing horizontal betatron oscillations encounter vertical field deviations at the horizontal

**Fig. 5.2** Tune jump scheme illustration. The beam energy is shown as a thick line (to include the momentum spread) and the intrinsic resonance is represented by the horizontal line with arrow in the left plot. On the right plot, the resonance curve is shown along with the fast tune shift due to the pulsed quadrupoles. The resonance crossing time is greatly reduced from *t* to *τ*

**Fig. 5.3** The measured asymmetry (proportional to polarization) is plotted vs. the tune jump firing energy in unit of Gauss Clock Counts (GCC). For a given radius, the beam energy is proportional to the beam momentum. The GCC is converted to momentum at the top of the figure

oscillation frequency. As a result, resonances are driven by the horizontal betatron oscillations, and will occur whenever the spin tune satisfies *νsp* <sup>=</sup> *<sup>k</sup>* <sup>±</sup> *νx*. This type of resonance is called horizontal intrinsic resonance. Since the two partial snakes are helical dipole magnets, the vertical magnetic field deviations distributed along the snakes are the main parts of the polarization perturbation. They have been observed in the AGS [10] (Fig. 5.4).

These resonances in general are weak but they are numerous. For an RMS emittance of 2µm, the resonance strength is in the order of 10−<sup>5</sup> to 10−4, but

**Fig. 5.4** The schematics of tune jump scheme. The blue trace is the spin tune as a function of *Gγ* during the acceleration. The red lines are the horizontal intrinsic resonance lines. The green lines are vertical intrinsic resonance lines. Over one unit of *Gγ* , two horizontal intrinsic resonances are crossed. *M,K*, and *N* are integers

there are over seventy of them! Given the AGS nominal ramp rate, a tune jump of 0.04 in 100µs should work. This increases the crossing speed by about 4 times. Maintaining the adiabaticity of the particle motion is the key to minimize any emittance growth, even for a small tune jump. A tune jump adiabatic enough to produce negligible emittance growth is sometimes called "benign". A pair of tune jump quads were installed in straight sections in two adjacent superperiods in the AGS, I5 and J5, where the *βx* is at its maximum. It should be noted that the vertical tune would also be affected by the tune jump quads, but at a small amplitude due to the small beta function. As the vertical tune is fairly close to integer (*νy* <sup>∼</sup> <sup>8</sup>*.*98), the perturbation to orbit motion needs to be minimized. Figure 5.5 shows the betatron tune measurements along the energy ramp. The tune measurement time was chosen such that it gave tunes alternatively as jump up value and jump down value (or no jump value). The ramp starts at 149 ms and reaches flattop at 581 ms. The figure shows that the horizontal tune jump amplitude is about 0.04 and the vertical tune jump amplitude is about 0.02.

Figure 5.6 illustrate the resonance crossing with tune and energy spreads. They are plotted for resonances near *Gγ* <sup>=</sup> 45, but are representative for all resonances when *Gγ >* 19. To benefit from the tune jump, the beam particles have to cross the resonance line during the jump. For the given beam parameters (tune jump amplitude, chromaticity, beam momentum spread), about 76% beam will benefit from the tune jumps above *Gγ >* 19. The jump timing determination requires accurate determination of beam energy as function of ramp time. The beam energy information on the energy ramp comes from measuring the AGS main magnetic field and measuring the beam momentum offset using the radial average from the

**Fig. 5.5** The measured betatron tunes along the ramp as a function of time from AGS T0. Note that there was no tune jump around 300 ms to avoid interference with other beam operation system

**Fig. 5.6** Sketch of a resonance crossing on the increasing *νx* side of the pulse (*Gγ* <sup>=</sup> <sup>54</sup> <sup>−</sup> *νx* <sup>=</sup> 45*.*3). The horizontal axis is relative time to the resonance crossing. The vertical axis is energy relative to the synchronous particle at jump time in units of *Gγ* . The solid line applies to the synchronous particle, and the two types of broken lines apply to the boundary particles at the FWHM. The momentum FWHM width is assumed as 10−3, which is close to the real *dp/p* in the later part of the ramp. A chromaticity of <sup>−</sup>8 is used for the plot. The ramp rate *dGγ /dt* is 0.117/ms. The plot shows that particles within FWHM (76 % of the beam) benefit from the tune jump

**Fig. 5.7** The measured polarization at the AGS extraction as a function of overall jump quad timing. Error bars are statistical errors only. The solid line is a fit of Gaussian distribution with *<sup>σ</sup>* <sup>=</sup> <sup>214</sup>µ<sup>s</sup>

beam position measuring system. As a cross check, the second set of beam energy information is derived from beam frequency and path length. The jump timing is then derived from the beam energy and horizontal tune as a function of the ramp time.

Since the polarization loss from an individual resonance is too small to measure, it is only practical to do the overall timing scan to check the effect of tune jump on the polarization (Fig. 5.7). With the assumption of Gaussian beam distribution, the polarization distribution is expected to be Gaussian. From the beam parameters, the width of this Gaussian is expected to be around 145µs. If there are errors in the individual jump quad timing, the distribution *σ* will be larger, which is what has been observed.

In summary, the tune jump method is very powerful to overcome intrinsic resonances. The associated emittance growth requires centering the beam orbit inside the jump quads. When the tune jump speed can be relaxed to 20–30 turns, the emittance growth is manageable at a few percents level. This method is still in use such as the AGS horizontal tune jump system [11] and it is also planned for the future EIC polarized deuteron program [12].

# *5.2.5 Fast Acceleration for Weak Resonance*

The intrinsic resonance condition is given as *νsp* <sup>=</sup> *nP* <sup>±</sup> *νy* . If the superiodicity *P* can be increased in the lattice design stage, the space between strong intrinsic resonances can be increased. It is possible that the resonance condition for strong intrinsic resonances are pushed out of a given energy range. Specifically, for *P > νy*, the first two important intrinsic resonances occur at *Gγ* <sup>=</sup> *νy* and at *Gγ* <sup>=</sup> *<sup>P</sup>* <sup>−</sup> *νy* . If we now ensure that both *νy* and *<sup>P</sup>* <sup>−</sup> *νy* are greater than the maximum *Gγ* value then all the major intrinsic spin resonances can be avoided. Alternatively, one could also choose *νy* to be greater than the maximum *Gγ* and *<sup>P</sup>* <sup>−</sup> *νy* less than the lowest *Gγ* value. This ingenious optical design has been used in the EIC RSC ring design [13]. By choosing *<sup>P</sup>* <sup>=</sup> <sup>96</sup> and integer part of the vertical betatron tune to be <sup>41</sup> *<sup>&</sup>lt;* [*νy*] *<sup>&</sup>lt;* 55, polarized beam can be accelerated to *Gγ* <sup>=</sup> <sup>41</sup> from low energy without crossing a strong intrinsic resonance. Here [*νy*] indicates the nearest integer to the vertical betatron tune.

Unfortunately, the existing RHIC tunnel resembles a hexagon with rounded corners rather than a circle, and therefore has a natural periodicity of six. However, if we consider that the spin precession, which advances as *Gγ* , occurs in the dipoles and does not advance at all in a drift, one can recover the periodicity of 96 from the point of view of *Gγ* precession. This can be accomplished by designing the straight sections such that their betatron phase advance is equal to <sup>2</sup>*πk* with *<sup>k</sup>* ∈ {1*,* <sup>2</sup>*,* <sup>3</sup>*, ...*}. In this way the straight sections will not contribute to the integral which defines the strength of the spin resonance (see Fig. 5.8). Thus the 96 periodicity can be maintained from the point of view of the spin precession. High periodicity arcs are used and unity transformation in the straight sections are used to transform the ring to the hexagon shape of RHIC tunnel. This suppresses all systematic depolarizing resonances up to *Gγ* =41.

The RCS is designed to eliminate intrinsic spin resonances during the acceleration cycle. However, any deviation from this ideal geometry, whether intentional, like insertion regions or accidental, like survey errors, has the potential to spoil the symmetry that keeps all the intrinsic resonance strengths sufficiently low. By minimizing the contributions to the spin integral introduced by these insertions we can ensure that polarization is maintained to emittances well beyond foreseeable

operational conditions. The results in Fig. 5.9, show that for the slowest ramp time of 200 ms 94% polarization transmission can be achieved.

# *5.2.6 Full Siberian Snake*

The snake magnet concept was first introduced by Russian physicists S. Derbenev and A.M. Kondratenko and the trajectory inside the magnet is like a snake (as shown in Fig 5.10). The idea is simple but genius: the spin is rotated by 180◦ around an axis in the horizontal plane. Any perturbation to the spin before the snake is unwounded by similar perturbation in the following section or orbit turn. For this reason, full snake is put into the category of overcoming resonances by reducing their effects. Because of the Siberian origins of the idea and the serpentine shape of the particle

**Fig. 5.9** ZGOUBI tracking results for 8 particles at 1000 mm-mrad normalized emittance. Comparing ramp times 50–200 ms. The vertical axis *Sy* represents the average vertical components of the spin vector. The vertical line marks the location of *Gγ* <sup>=</sup> <sup>41</sup>

**Fig. 5.10** Three-dimensional view of the trajectory through a RHIC Snake

trajectory, these magnets were dubbed Siberian snakes by Ernest Courant. In RHIC, dual full snakes are separated by half of the ring. Each snake rotates the spin vector 180◦ around an axis in the horizontal plane. There are two consequences of two snakes. First the stable spin direction of the whole ring is vertical. Second, for two snakes with the axis perpendicular to each other, spin tune is 0.5.

In the presence of snakes, one would think that the polarization can be preserved. However, there are additional high order depolarizing resonances, called snake resonances [14]. The snake resonance condition is given as

$$m\nu\_{\mathbb{Y}} = \nu\_{sp} + k \tag{5.9}$$

where *m* and *k* are integers. *m* is called the snake resonance order. Examples of the resonance conditions are <sup>5</sup> <sup>×</sup> <sup>0</sup>*.*<sup>7</sup> <sup>=</sup> <sup>0</sup>*.*<sup>5</sup> <sup>+</sup> <sup>3</sup> for *νy* <sup>=</sup> <sup>0</sup>*.*7; <sup>2</sup> <sup>×</sup> <sup>0</sup>*.*<sup>75</sup> <sup>=</sup> <sup>0</sup>*.*<sup>5</sup> <sup>+</sup> <sup>1</sup> for *νy* <sup>=</sup> <sup>0</sup>*.*75. For two snakes in a synchrotron, the even order resonances do not exist if the closed orbit is fully corrected, but the odd order resonances do. In the RHIC operation, there is almost no polarization loss on the ramp below 100 GeV, about 10%–15% polarization loss between 100 and 255 GeV [15].

Another idea similar to the snake is the figure-8 ring (Fig. 5.11). The perturbation to the spin motion in a figure-8 ring is also compensated in the two half rings, because the magnetic fields reverse signs [16].

# **5.3 Resonance Enhancement Method**

As the Froissart-Stora formula shows, with strong enough resonance strength, the spin can be fully flipped when crossing the resonance adiabatically. Polarization is preserved as the result. Options to enhance the resonance strength include running an AC dipole to enhance the intrinsic resonances and running a partial snake to enhance imperfection resonances. When the partial snake strength is strong enough, it can also overpower the intrinsic resonances. In these cases, the two resonances can be made to occur at nearly the same energy by choosing a tune very near an integer to create overlapping resonances. Condition for overlapping resonances is

$$
\delta \ll \min(\epsilon\_1, \epsilon\_2) \tag{5.10}
$$

This condition can be easily satisfied if using partial snake for the imperfection resonance case, as the two resonances are at the exact same location, and *<sup>δ</sup>* <sup>=</sup> 0. From this condition, one can see that AC dipole is not usable for a weak resonance: the required separation is not feasible.

# *5.3.1 AC Dipole*

An AC dipole is a magnet that can be adiabatically excited and de-excited with a continuous sine-wave in order to coherently move circulating beam out to large betatron amplitudes without incurring the emittance blow up. It has also been referred as RF dipole in some references.

Since the intrinsic spin resonance strength is proportional to the betatron amplitude, the final polarization is an ensemble average of the Froissart-Stora formula over the betatron amplitude of the beam particles. It is difficult to achieve a full spin flip for all particles since the resonance strength of the beam core is small. Alternatively, if the beam is kicked to induce a coherent betatron oscillation so that the betatron oscillation amplitudes of all particles are large, a full spin flip can be attained [17]. Essentially, the AC dipole field and the focusing potential of the accelerator form a potential well that preserves the emittance of the beam. Such a controlled coherent betatron oscillation can be obtained by using an AC dipole magnet operating at a frequency close to a betatron sideband. The schematics of the method is shown in Fig. 5.12. There are two requirements to use the AC dipole. First, there should be a large enough physical aperture for the needed large betatron motion amplitudes. Second, the original intrinsic resonance strength needs to be strong enough that the needed artificial resonance strength can be achieved with feasible tune separation. To preserve the emittance, the AC dipole amplitude was ramped up and down adiabatically. The drive signal and the measured beam position signals from the AGS AC dipole are shown in Fig. 5.13.

In a linear approximation, the amplitude of the coherent betatron motion is given by

$$\mathbf{y}\_{coh} = \frac{B\_{ml}}{4\pi (B\rho)\delta} \boldsymbol{\beta}\_{\mathbf{y}} \tag{5.11}$$

where *Bml* is the integrated field of the AC dipole, *Bρ* is the magnetic rigidity of the beam, *βy* is the vertical betatron function at the AC dipole, and *δ* is the difference between the AC dipole tune and the tune of the nearest betatron sideband. Equation 5.11 shows that although the coherent amplitude is larger with smaller tune separation *<sup>δ</sup>*, the beam is unstable at *<sup>δ</sup>* <sup>=</sup> 0. Figure 5.14 shows the measured

**Fig. 5.12** Beam in a quadrupole with and without AC dipole. The dash lines are the magnetic fields of the quadrupole. Left: beam stays in the center of the quadrupole and particles experience different magnetic fields. Right: the whole beam experiences large enough betatron amplitudes which results in full spin flip

**Fig. 5.13** Transverse displacement from BPM (top) and the AC dipole magnet field amplitude (bottom) as a function of turn number of AGS

**Fig. 5.14** Measured proton polarization vs the coherent betatron oscillation amplitude for different tune separations at spin depolarizing resonances <sup>0</sup> <sup>+</sup> *νy* (bottom plot), <sup>12</sup> <sup>+</sup> *νy* (middle plot), and <sup>36</sup> <sup>−</sup> *νy* (upper plot). *Py* stands for the vertical polarization, while *Ycoh* stands for the vertical coherent oscillation amplitude (Note that in Bai et al. [18] notations, vertical axis *y* is denoted by *z*). The error bars show only the statistical errors. The resonance strength of the coherent spin resonance due to the AC dipole is proportional to the coherent betatron amplitude. The lines are the results of multi-particle spin simulations based on a model with two overlapping spin resonances

polarization at three energies versus the AC dipole strength, which is converted to the corresponding coherent betatron amplitude [18]. The lines shown on the figure correspond to results obtained from numerical spin simulations of a two spin resonance model. The oscillatory behavior of the simulation result is due to the interference between the coherent betatron oscillations and the intrinsic betatron motion. The spin vector of each particle was tracked by multiplying its turn by turn transform matrix. The beam polarization was then obtained from the spin ensemble average of a Gaussian beam distribution. The agreement between experimental data and simulations are very good.

# *5.3.2 Partial Snake for Imperfection Resonances*

Partial snake is a device to rotate the spin by an angle *φ*sp less than 180◦ in one orbit turn. Such a spin rotator can be constructed by using either solenoidal magnets, or a sequence of interleaved horizontal and vertical dipole magnets producing only local orbit distortions. For low energy synchrotrons like the Brookhaven AGS with weak depolarizing resonances, one might consider solenoidal snake. However, for practical field strengths, a full solenoidal snake would require 10 m of straight section, which is not available in the AGS. Strong solenoids can also cause undesirable coupling between horizontal and vertical betatron oscillations, which would require compensation to maintain beam stability. Another option is to use helical dipole as snake. The required magnet field is not practical to be ramped quick enough along the energy ramp. For a constant field, the optical distortions at lower energies would reduce the dynamic aperture. With the constraints in the AGS, it is better to overcome the imperfection resonances with a partial snake [19].

To illustrate how a partial snake works, we consider a perfect synchrotron with a solenoidal snake inserted. For an ideal particle (which moves on the betatron closed orbit without displacement) in a perfect synchrotron, where *<sup>ξ</sup>* <sup>=</sup> 0, the spinor is transformed according to

$$\Psi(\theta\_f) = e^{-\frac{1}{2}iG\gamma[\theta\_f - \theta\_l]\theta\_3}\Psi(\theta\_l) = T(\theta\_f, \theta\_l)\Psi(\theta\_l),\tag{5.12}$$

where *θi* and *θf* are the initial and final orbit angles, respectively. When *θf* <sup>−</sup> *θi* <sup>=</sup> 2*π*, the spinor is transformed by a spin transfer matrix, called one turn map (OTM) [20],

$$T(\theta\_l + 2\pi, \theta\_l) = e^{-iG\gamma\pi\sigma\_3},\tag{5.13}$$

where the stable spin direction is vertical (*e*ˆ3). When solenoidal fields (rotating the spin by *<sup>φ</sup>*sp radian along the longitudinal *<sup>e</sup>*ˆ<sup>2</sup> direction) are present, the OTM, *<sup>T</sup>* , is obtained as a product of a spin rotation in the Siberian snake by an angle *φ*sp around the longitudinal direction and the precession in the main bending magnets around the vertical direction by the angles *Gγ θ* (before the snake) and *Gγ (*2*<sup>π</sup>* <sup>−</sup> *θ )* (after the snake):

$$T = e^{-i\frac{1}{2}G\gamma(2\pi - \theta)\sigma\_3} e^{-i\frac{1}{2}\phi\_{\text{sp}}\sigma\_2} e^{-i\frac{1}{2}G\gamma\theta\sigma\_3},\tag{5.14}$$

where *θ* is the orbit angle between the observation point and the snake. Completeness of Pauli matrices guarantees that any succession of rotations in the 3-D space is equivalent to a rotation around a specified axis. If the spin vector is lying on this direction initially, it will stay on this direction. That is the so-called spin closed orbit. The OTM can be rewritten as a precession around the spin close orbit *<sup>n</sup>*<sup>ˆ</sup> *co* (canonical form):

$$T = e^{-i\pi\upsilon\_{\text{top}}\hat{n}\_{\text{co}}\cdot\sigma}, \qquad \hat{n}\_{\text{co}} = \cos\alpha\imath\hat{e}\mathfrak{z} + \cos\alpha\jmath\hat{e}\mathfrak{z} + \cos\alpha\jmath\hat{e}\mathfrak{l}, \tag{5.15}$$

where *νsp* is the spin tune and *(*cos *<sup>α</sup>*1*,* cos *<sup>α</sup>*2*,* cos *<sup>α</sup>*3*)* is direction cosine of *<sup>n</sup>*<sup>ˆ</sup> *co* along *(e*ˆ1*, <sup>e</sup>*ˆ2*, <sup>e</sup>*ˆ3*)* axes respectively. A spin vector lying along the *<sup>n</sup>*<sup>ˆ</sup> *co* is invariant under the transformation of the Eq. (5.15). On the other hand, any spin vector which is not lying along the *<sup>n</sup>*ˆ*co*, will precess around the *<sup>n</sup>*ˆ*co* at a rate of *νsp* precessing turns per revolution around the synchrotron. Identifying matrix elements of Eq. (5.14) with those of Eq. (5.15),

$$\cos \pi \upsilon\_{sp} = \cos \frac{\phi\_{\rm sp}}{2} \cos G \gamma \pi \tag{5.16}$$

and

$$\cos \alpha\_3 = \frac{1}{\sin \pi \upsilon\_{sp}} \sin(\pi \, G\chi) \cos(\frac{\phi\_{\rm sp}}{2}),\tag{5.17}$$

$$\cos\alpha\_{\rm l} = -\frac{1}{\sin\pi\upsilon\_{sp}}\sin G\gamma(\pi-\theta)\sin(\frac{\phi\_{\rm sp}}{2}),\tag{5.18}$$

$$\cos \alpha\_2 = \frac{1}{\sin \pi \upsilon\_{sp}} \cos G\gamma(\pi - \theta) \sin(\frac{\phi\_{\rm sp}}{2}). \tag{5.19}$$

For a 100% snake, *<sup>φ</sup>*sp <sup>=</sup> *<sup>π</sup>*, we have *νsp* <sup>=</sup> <sup>1</sup>*/*2. Neither resonance condition discussed in Chapter 1 is therefore ever satisfied regardless of the beam energy. For a partial snake, *φ*sp *< π*, when *φ*sp is small, the spin tune is nearly equal to *Gγ* except when *Gγ* equals an integer *n*, where the spin tune *νsp* obtained from Eq. (5.16) is shifted from the integer by <sup>±</sup>*φ*sp*/*2. Thus, the partial snake creates a gap at all integers in the spin tune, and since the spin tune never equals an integer, the imperfection resonance condition is never satisfied. Thus the partial snake can overcome all imperfection resonances, provided that the existing resonance strengths in the lattice are much smaller than the gap created by the partial snake. The denominator in Eqs .(5.17)–(5.19) can be calculated from Eq. (5.16):

$$
\sin \pi \upsilon\_{sp} = \pm \sqrt{1 - \cos^2(\pi G \wp) \cos^2(\phi\_{\text{sp}}/2)}.\tag{5.20}
$$

The physics constraint is that the change of the stable spin direction has to be continuous with *Gγ* . Due to the gap <sup>±</sup>*φ*sp*/*2, sin *πνsp* is not continuous when changing the sign. So we should choose positive root in Eq. (5.20). The Eqs. (5.17)– (5.19) can be rewritten as

$$\cos \alpha\_3 = \frac{1}{\sqrt{1 - \cos^2(\pi G \gamma) \cos^2(\phi\_{\rm sp}/2)}} \sin(\pi G \gamma) \cos(\frac{\phi\_{\rm sp}}{2}) \tag{5.21}$$

$$\cos\alpha\_1 = -\frac{1}{\sqrt{1-\cos^2(\pi G\gamma)\cos^2(\phi\_{\text{sp}}/2)}}\sin G\gamma(\pi-\theta)\sin(\frac{\phi\_{\text{sp}}}{2}), \quad (5.22)$$

$$\cos\alpha\_2 = \frac{1}{\sqrt{1-\cos^2(\pi G\chi)\cos^2(\phi\_{\rm sp}/2)}}\cos G\chi(\pi-\theta)\sin(\frac{\phi\_{\rm sp}}{2}). \quad (5.23)$$

The effect of a partial snake can also be analyzed in another view. The localized spin rotation by a partial snake is

$$\phi\_{\rm sp} \delta(\theta - \theta\_0)$$

and the strength of generated resonance is the Fourier amplitude:

$$\frac{\phi\_{\rm sp}}{2\pi}e^{in\theta\_0} \quad \text{for all } G\mathcal{Y} = n.$$

This means that the spin rotator is equivalent to imperfection resonances at all integer harmonics with equal resonance strengths. With the presence of an imperfection resonance and a partial snake, the Froissart-Stora formula can be rewritten as

$$\frac{P\_f}{P\_l} = 2\exp(-\frac{\pi}{2\alpha}|\epsilon + \frac{\phi\_{\rm sp}}{2\pi}e^{in\theta\_0}|^2) - 1. \tag{5.24}$$

Complete spin-flip occurs if

$$
\phi\_{\rm sp} \gg 2\pi |\epsilon| + \sqrt{8\pi\alpha}.
$$

For the AGS, *<sup>α</sup>* <sup>=</sup> <sup>4</sup>*.*<sup>5</sup> <sup>×</sup> <sup>10</sup>−5*,*|<sup>|</sup> *<sup>&</sup>lt;* <sup>0</sup>*.*<sup>01</sup> from previous experiment [3, 9], thus *<sup>φ</sup>*sp <sup>=</sup> <sup>0</sup>*.*05*<sup>π</sup>* is enough to overcome all imperfection resonances. Then the spin dynamics when crossing the imperfection resonances will be dominated by the partial snake.

The experiment of a partial snake was carried out in the AGS [21]. Figure 5.15 shows the measured polarization as a function of *Gγ* for a 10% partial snake. The polarization was observed to follow the predicted spin flip in passing through each imperfection resonance without loss of polarization. Without the snake, shown as open circles, there was some depolarization at *Gγ* <sup>=</sup> 8. The increased depolarization when *Gγ* is slightly larger than an integer, particularly noticeable for *Gγ* <sup>=</sup> 8, is due to the reduced acceleration rate just before the polarization measuring flat top. With the partial snake to overcome the imperfection resonances, the polarization is maintained through the imperfection resonances at *Gγ* <sup>=</sup>integers, but there are losses at intrinsic resonances. Without the partial snake, polarization is lost after *Gγ* <sup>=</sup> <sup>12</sup>*.*<sup>5</sup> as shown in Fig. 5.16.

**Fig. 5.15** The measured vertical polarization as a function of the spin tune *Gγ* for a 10% snake is shown with and without a partial snake. Note that partial depolarization at *Gγ* <sup>=</sup> <sup>8</sup> is avoided by using a 10% snake. The error bars only represent the statistical errors. The solid line is the result of Eq. (5.22). The measurement was done at betatron tunes of *νx* <sup>=</sup> <sup>8</sup>*.*<sup>7</sup> and *νy*=8.8

**Fig. 5.16** The measured absolute value of the vertical polarization at *Gγ* <sup>=</sup> *<sup>n</sup>* <sup>±</sup> <sup>1</sup> <sup>2</sup> , up to *Gγ* <sup>=</sup> <sup>22</sup>*.*<sup>5</sup> (solid points). Note that partial depolarization is due to intrinsic spin resonances at *Gγ* <sup>=</sup> <sup>0</sup> <sup>+</sup> *νy ,* <sup>24</sup> <sup>−</sup> *νy* and <sup>12</sup> <sup>−</sup> *νy*

# *5.3.3 Strong Partial Snake to Overcome Intrinsic Resonances*

For a full snake, the spin tune is 1/2 for all energies, the spin tune gap is 0.5. A strong partial snake generates large spin tune gap for *Gγ* <sup>=</sup> *<sup>N</sup>*, where *<sup>N</sup>* is an integer. When the gap is large enough to put the vertical tune inside the spin tune gap, the intrinsic resonance condition can never be satisfied. Then it can overcome both intrinsic and imperfection resonances. The spin tune gaps for various partial snake strengths are shown in Fig. 5.17. Alternatively, this can be understood by a strong resonance at *Gγ* <sup>=</sup> *<sup>N</sup>* which overpowers the nearby imperfection and intrinsic resonances.

An experiment was carried out in the AGS with the solenoidal partial snake [22]. At low energies, the magnet can generate a stronger partial snake. The experiment was carried out to overcome <sup>0</sup> <sup>+</sup> *νy* resonance located near *Gγ* <sup>=</sup> <sup>8</sup>*.*<sup>7</sup> with solenoid magnet running as an 11.4% partial snake. The polarization was measured at *Gγ* <sup>=</sup> 12*.*5. The results are shown in Fig. 5.18. Note that with a strong snake, the stable spin detection will deviate from vertical significantly. For example, it will be 18◦ for a 20% partial snake.

As shown in Fig. 5.18, the measured polarization reached a plateau when the vertical betatron tune was very close to 9.00. The polarization loss in this region was only about 6% and can be completely explained by spin mismatching at AGS injection and depolarization from coupling resonances as discussed below.

**Fig. 5.17** Spin tune for various partial Siberian snake strengths. The straight line indicates a possible value for the vertical betatron tune

**Fig. 5.18** The measured vertical polarization as a function of the vertical betatron tune for an 11.4% partial Siberian snake. The dashed straight line indicates the polarization level measured at the end of the linac. Since the two imperfection resonances in the Booster have been corrected by harmonic orbit correctors, this is also the beam polarization at AGS injection. The solid curve shows the results of both multi-particle simulations and DEPOL calculations

These observations agree well with spin dynamics calculations.With a partial Siberian snake inserted, there are two strong resonances in this energy region: one located at *Gγ* <sup>=</sup> <sup>9</sup> generated by the partial Siberian snake and the intrinsic resonance at *Gγ* <sup>=</sup> <sup>0</sup> <sup>+</sup> *νy* . When the intrinsic and artificial resonances do not overlap (*νy* - <sup>8</sup>*.*85), the resonance at *Gγ* <sup>=</sup> <sup>9</sup> should flip the spin completely while the intrinsic resonance at *Gγ* <sup>=</sup> <sup>0</sup> <sup>+</sup> *νy* causes some depolarization. When the two resonances are very close, such as for *νy* <sup>=</sup> <sup>8</sup>*.*98, the intrinsic resonance is overpowered by the resonance at *Gγ* <sup>=</sup> 9. The particles essentially just experience one resonance at *Gγ* <sup>=</sup> 9, and full spin flip is observed. When the two resonances are at intermediate separations, such as for *νy* <sup>≈</sup> <sup>8</sup>*.*<sup>90</sup> to 8.95, they interfere with each other.

Since there is linear coupling between the beam motion in the two transverse planes, the following coupling resonances in the vicinity of *Gγ* <sup>=</sup> <sup>9</sup> should also be considered: *Gγ* <sup>=</sup> <sup>17</sup> <sup>−</sup> *νx ,* <sup>0</sup> <sup>+</sup> *νx ,* <sup>18</sup> <sup>−</sup> *νx* , and <sup>1</sup> <sup>+</sup> *νx*. These resonances are not in the spin-tune gap generated by the strong partial snake. Since *νx* and *νy* are well separated, these resonances can be treated separately as isolated resonances. Using the Froissart-Stora formula, the total polarization loss due to the coupling resonances was calculated to be 5%. The polarization loss due to spin mismatching at injection was calculated to be 1%. The difference of the injection polarization and the measured one at *Gγ* <sup>=</sup> <sup>12</sup>*.*<sup>5</sup> is well understood.

# *5.3.4 Dual Partial Snakes*

For a strong partial snake, however, polarization loss due to spin mismatch at injection and extraction is no longer negligible. A 20% snake will lead to a 10% polarization loss due to this spin direction mismatch. This could be solved with appropriate spin rotators in the injection and extraction beam lines. However, a single additional partial snake located in the synchrotron can provide the spin direction matching at injection and extraction and also increase the effective partial snake strength if its position is chosen properly.

The location and the precession axis direction of multiple partial snakes has to be chosen very carefully to maintain control of the spin tune in a similar way as is necessary for multiple full snakes. For practical partial snakes the precession axis direction is always very close to longitudinal, which leaves only the location and strength of the partial snakes as free parameters.

The spin tune for two partial snakes separated by the fraction 1/*m* of the ring circumference is given by Roser et al. [23]:

$$\cos \pi \upsilon\_{sp} = \cos \frac{s\_1 \pi}{2} \cos \frac{s\_2 \pi}{2} \cos G \gamma \pi - $$

$$\sin \frac{s\_1 \pi}{2} \sin \frac{s\_2 \pi}{2} \cos \frac{G \gamma \pi (m-2)}{m}, \tag{5.25}$$

where *s*1*π* and *s*2*π* are the rotation angles of the two partial snakes. The derivation is similar to the one partial snake case by using OTM method.

Separating the two partial snakes by one third of the ring is of particular interest since it will introduce a periodicity of three units in the spin tune dependence on *Gγ* . Since both the super-periodicity of the AGS (12) and the vertical betatron tune (∼9) are divisible by three, the spin tune will be the same at all strong intrinsic resonances, namely *νsp* <sup>=</sup> *(s*<sup>1</sup> <sup>+</sup> *<sup>s</sup>*2*)/*<sup>2</sup> for *Gγ* <sup>=</sup> <sup>3</sup>*n*, where n is an integer. With both snakes at equal strength *<sup>s</sup>*, *νsp* <sup>=</sup> *<sup>s</sup>* they effectively double the strength of one partial snake. At the injection and extraction energies, for which *Gγ* <sup>=</sup> <sup>3</sup>*n*+1*.*5, the two partial snakes cancel. The polarization direction in the AGS is therefore exactly vertical and no polarization is lost due to spin direction mismatch.

Even using the 10% partial snake together with the presently installed warm helical partial snake with a rotation angle of 10*.*6◦ (5.9%) at extraction energy, a very substantial reduction of the injection and extraction spin mismatch can be achieved. At the same time the effective strength of the partial snakes at the strong intrinsic resonances is significantly increased. Since it is not practical to ramp the two partial snake magnets, their fields are kept constant. The snake strength quoted here is the strength at extraction energy. Figure 5.19 shows the spin tune and the vertical betatron tune in the AGS with two partial snakes of 2.11 T (10% partial snake) and 1.53 T (5.9% partial snake), respectively. The partial snakes have to be located as shown in Fig. 5.20, spaced one third of the ring apart. In this case the polarization loss due to injection and extraction mismatch is about 1%. For a single partial snake with strength of 15.9%, the loss would be 6%.

**Fig. 5.19** Fractional part of measured vertical tune (dots connected with dashed line) along the energy ramp and spin tune for the combination of 2.11 T and 1.53 T partial snakes

**Fig. 5.20** Locations of the partial snakes and the injection and extraction regions that give minimum polarization loss due to spin direction mismatch

To maintain polarization in the AGS, the vertical tunes along the energy ramp have to be put into the spin tune gap generated by the two partial snakes. Moreover, due to the so-called partial snake resonances[14], the available tune space is reduced even further. The partial snake resonances occur when

$$\nu\_{sp} = k \pm l \nu\_{\circ},\tag{5.26}$$

where *k* and *l(>* 1*)* are integers. This is the same condition as for full snake resonances [24, 25]. The polarization was measured as a function of the vertical

**Fig. 5.21** Polarization as function of vertical tunes at two intrinsic resonances with different resonance strength.The dash line shows the position of the spin tune gap for a combined 19.9% (14% + 5.9%) partial snake strength.The locations of high order (l = 2, 3 and 4) snake resonances near intrinsic resonance <sup>36</sup> <sup>+</sup> *νy* are marked

betatron tune in the vicinity of several intrinsic resonances. Figure 5.21 depicts the effect of the partial snake resonances near the two intrinsic resonances for the 14% cold partial snake and 5.9% warm partial snake. Similar structure has also been observed in the earlier experiment with single partial snake in Fig. 5.18. The high order snake resonance locations can be calculated by solving Eqs. (5.25) and (5.26) and they agree well with the measured values as marked in Fig. 5.21 [26]. The snake resonance strength is proportional to the strength of the nearby intrinsic resonance. The intrinsic resonance strength can be calculated from DEPOL [1] for a given lattice. For the weak intrinsic resonance (12 <sup>+</sup> *νy* ), there is only a benign effect from the snake resonances and polarization reaches a plateau above 8.96. For the strong intrinsic resonance (36 <sup>+</sup> *νy* ), the data shows the effect from the second, third and forth order partial snake resonances. The vertical chromaticity was set close to zero along the energy ramp to reduce the betatron tune spread due to the momentum spread. This helps to reduce the depolarization from the snake resonances. As expected, the higher the resonance order, the weaker the resonance strength shown as less of a polarization dip. In addition, when the vertical tune is pushed beyond 8.99, the associated large orbit distortions (see discussion after Eq. (5.27) is likely the cause of the polarization drop of the last data point.

In a synchrotron, the vertical rms closed orbit is given by

$$
\lambda \text{yoo,rms} \approx \frac{\beta \text{av}}{2\sqrt{2} \mid \sin \pi \upsilon\_{\text{y}} \mid} \sqrt{N} \theta\_{\text{rms}}, \tag{5.27}
$$

where *β*av*,N,νy* , and *θ*rms are respectively the average vertical *β*-function, the number of dipoles with field errors, the vertical betatron tune and the rms steering errors. As seen from Eq. (5.27), the closed orbit amplitude is greatly enhanced when the betatron tune is close to an integer for the same steering errors. As the imperfection resonance strength is proportional to the closed orbit amplitude and beam energy, the imperfection resonance can still be important at high energies even with two partial snakes installed. Since the betatron tune is close to 9, the 9th and multiple of 9 harmonics are strong. The strength of the imperfection resonance calculated for AGS lattice with a large orbit distortion and vertical tune close to 9 could be comparable to the partial snake strength. If they have opposite phase, the imperfection resonance just cancels the effect of the two partial snakes. In fact, we observed polarization loss when the amplitudes of the 9th harmonic of the closed orbit are large. A measurement of polarization as a function of the 9th harmonic orbit amplitude is shown in Fig. 5.22. The depolarization occurs at the expected amplitude.

**Fig. 5.22** Measured polarization as a function of the sine 9th harmonic amplitude at 36+*νy* . The dashed line is to guide the eyes. The location of the polarization dip agrees with calculation

# **5.4 Spin Manipulations**

# *5.4.1 Spin Flipper*

In polarized proton collision experiments, it is highly advantageous to flip the spin of each bunch of protons during the stores to reduce the systematic errors. The Froissart-Stora formula shows that an artificial resonance can be introduced to flip the spin.

The traditional spin flipping technique uses a single rf spin rotator that rotates the spin around an axis in the horizontal plane. The spin rotator can be implemented as a dipole or a solenoid running with certain rf frequency. It can be done by ramping the frequency of the spin rotator tune *νosc* across the spin tune *νsp* adiabatically and the spin can be flipped following the Froissart-Stora formula:

$$\frac{P\_f}{P\_l} = 2\exp[-\frac{\pi}{2}\frac{|\epsilon|^2}{\alpha}] - 1,\tag{5.28}$$

where

$$\alpha = \frac{\Delta v\_{osc}}{2\pi N} \tag{5.29}$$

where *νosc* is the range of the rf spin rotator tune sweep range, *N* is the number of turns the sweep covers. As long as the spin tune is covered by the sweeping range of the rf device, a resonance will be crossed. With proper sweeping speed, the spin can be flipped. Simulations of such a process is shown in Figs. 5.23 and 5.24.

Experiments done at low energies (from 100 MeV to 2 GeV) have demonstrated a spin flip efficiency over 99% [27, 28]. The spin flip is achieved by ramping the rf

**Fig. 5.23** The AC dipole running with frequency sweeping over time

**Fig. 5.24** Simulations of spin of an ensemble beam particles in the presence of the artificial resonance from a sweeping AC dipole

spin rotator tune *νosc* across the spin tune *νsp* adiabatically. The experimental results are shown in Fig. 5.25.

It should be noted that such a single spin rotator generates two spin resonances, one at *νsp* <sup>=</sup> *νosc*, and one at *νsp* <sup>=</sup> <sup>1</sup>−*νosc* or the so-called "mirror" resonance. As long as the spin tune is sufficiently far away from half integer, say at 0.47, then the two spin resonances are sufficiently far from each other and each one can be treated as an isolated resonance. This is the case for low energies when Siberian Snakes are not needed and the spin tune is not at or near half integer. In high energy polarized proton colliders such as RHIC, the spin tune is very close to half integer. The two spin resonances overlap and their interference makes the full spin flip impossible with such a single rf spin rotator. To reach a full spin flip, the "mirror" resonance has to be eliminated [29].

For the spin flipper to work with a spin tune near 0.5 it has to induce only one spin resonance at *νsp* <sup>=</sup> *νosc*. In addition, it is critical to eliminate any global vertical betatron oscillations driven by the AC dipole to achieve full spin flip [30]. Thus we have chosen a spin flipper design which consists of five AC dipoles with horizontal magnetic field and four DC dipoles with vertical magnetic field, which not only eliminates the "mirror" resonance, but also forms two closed vertical orbital bumps and eliminates the global vertical oscillations outside the spin flipper [31]. Figure 5.26 shows the schematic drawing of the spin flipper design. The first three AC dipoles form the first closed orbital bump and the last three AC dipoles form the second closed orbital bump. The middle AC dipole (No. 3) is used twice. The four

**Fig. 5.25** The vertical polarization as a function of the flip time. When the flip time is long enough to satisfy the adiabatic condition, the spin is flipped

**Fig. 5.26** Schematics of the high energy spin flipper in RHIC. It consists of five AC dipoles and four DC dipoles

DC dipoles yield spin rotation angles of +*ψ*0/-*ψ*0/-*ψ*0/+*ψ*0. The rotation angle *ψ*<sup>0</sup> is given by

$$
\psi\_0 = (1 + G\chi) \frac{B\_{dc}L}{B\rho} \tag{5.30}
$$

where *Bρ* is the beam particle magnetic rigidity, *BdcL* is the integrated B field of each DC dipole. These DC dipoles create a closed local horizontal bump leaving the spin tune *νsp* unchanged. The five AC dipoles are operated at the frequency about half of revolution frequency, so that the tune *νosc* is in the vicinity of *νsp*. AC dipoles 1–3 and AC dipoles 3–5 create a local vertical orbit bump with a <sup>+</sup>*φosc/*−<sup>2</sup> *φosc/* <sup>+</sup> *φosc* spin rotation sequence. The rotation angle *φosc* is given by

$$\phi\_{osc} = (1 + G\gamma) \frac{B\_{acl}}{B\rho} \tag{5.31}$$

where *Bacl* is the integrated B field of AC dipole. This configuration induces a spin resonance at *νosc* <sup>=</sup> *νsp* while eliminating the "mirror" resonance at <sup>1</sup> <sup>−</sup> *νsp* and therefore ensuring a single resonance crossing during a *νosc* sweep through *νsp* <sup>≈</sup> <sup>1</sup> 2 and producing full spin flip. In the presence of a "mirror" resonance, the isolated resonance crossing condition would otherwise require *νsp* to be far enough away from <sup>1</sup> <sup>2</sup> . The effective spin resonance strength of the spin flipper *k* then becomes

$$\epsilon\_k = 2 \frac{\phi\_{osc}}{\pi} \sin \psi\_0 \sin \frac{\psi\_0}{2} \tag{5.32}$$

In order to eliminate the global AC dipole driven vertical betatron oscillations, the currents of the five AC dipoles have to satisfy Eq. (5.33) so that they excite only two closed vertical orbit bumps:

$$\begin{aligned} I\_2 &= I\_0 \sin(2\pi \upsilon\_{osc} i + \chi\_1) \\\\ I\_4 &= I\_0 \sin(2\pi \upsilon\_{osc} i + \chi\_2) \\\\ I\_1 &= \frac{1}{2} I\_0 \sin(2\pi \upsilon\_{osc} i + \chi\_1 + \pi) \\\\ I\_5 &= \frac{1}{2} I\_0 \sin(2\pi \upsilon\_{osc} i + \chi\_2 + \pi) \\\\ I\_3 &= I\_1 + I\_5 \end{aligned} \tag{5.33}$$

where *Ik* is the current of *kth* AC dipole and *i* is the *ith* orbital revolution. *χ*<sup>1</sup> and *χ*<sup>2</sup> correspond to the initial phase of AC dipole bump 1 and 2, respectively. *<sup>χ</sup>*<sup>1</sup> <sup>−</sup> *<sup>χ</sup>*<sup>2</sup> <sup>=</sup> *<sup>ψ</sup>*<sup>0</sup> is the condition for exciting a single isolated resonance at *νsp* <sup>=</sup> *νosc* with the spin flipper.

Besides eliminating the "mirror" resonance and any global vertical betatron oscillation driven by AC dipoles, the reduction of the spin tune spread is also critical for achieving full spin flip. The spin tune of a synchrotron with two Siberian Snakes installed at opposite sides of the ring is given by

$$\nu\_{sp} = \frac{1}{2} + \frac{(1 + G\gamma)(\theta\_1 - \theta\_2)}{2\pi},\tag{5.34}$$

where *θ*<sup>1</sup> and *θ*<sup>2</sup> are the integrated bending angles of the first half arc and second half arc, respectively. For the on-energy and on-axis protons both *θ*<sup>1</sup> and *θ*<sup>2</sup> are equal (*π*) and the design-orbit spin tune is <sup>1</sup> <sup>2</sup> independent of the beam energy. This changes when synchrotron motion and the resulting momentum spread *<sup>p</sup> p* are considered. The change in the bending angles are *<sup>θ</sup>*<sup>1</sup> <sup>=</sup> *(x* <sup>1</sup> <sup>−</sup> *<sup>x</sup>* <sup>2</sup>*)* and *<sup>θ</sup>*<sup>2</sup> <sup>=</sup> *(x* <sup>2</sup> <sup>−</sup> *<sup>x</sup>* 1*)* respectively, where *x* <sup>1</sup> and *<sup>x</sup>* <sup>2</sup> are the slopes of the beam trajectory at the first and the second Siberian Snake. The spin tune then becomes <sup>1</sup> <sup>2</sup> <sup>+</sup>*(*1+*Gγ )(x* 2−*<sup>x</sup>* <sup>1</sup>*)/π*. To the first order, *<sup>x</sup>* can be expressed as *<sup>x</sup>* <sup>=</sup> *<sup>D</sup> <sup>p</sup> <sup>p</sup>* , which measures orbit difference due to the momentum offset. Here *D* is the slope of the dispersion function *D*, which measures orbit difference due to momentum offset. The momentum spread causes a spin tune spread when the dispersion slopes are different at the two Siberian Snakes [32]:

$$
\Delta\nu\_{sp} = \frac{(1 + G\chi)}{\pi} (D\_1' - D\_2') \frac{\Delta p}{p} \tag{5.35}
$$

In RHIC, this local dispersion slope difference between the two Siberian Snakes is about 0.045 at 255 GeV, which corresponds to 0.007 spin tune spread for a beam with a momentum spread of 0.001. This is comparable to the proposed spin tune sweep range of 0.02. Hence, successful full spin flipping requires to match the dispersion slopes. Since the *Gγ* values of 24 GeV (*Gγ* <sup>=</sup> <sup>45</sup>*.*5) and 255 GeV (*Gγ* <sup>=</sup> 487) differ by a factor of ten, the required *<sup>D</sup>* <sup>=</sup> *(D* <sup>1</sup> <sup>−</sup> *<sup>D</sup>* <sup>2</sup>*)* is ten times smaller at 255 GeV than at 24 GeV to maintain the same spin tune spread *νsp*. Such a small *D* lattice was achieved by using *γt r* transition jump quads [33].

In sweep measurements, the driving tune was swept over typical 0.005 range for a certain time (such as 1 second). The polarization was measured before and after each sweep. At injection, the final to initial polarization ratio was measured with *D* as low as 0.003. The spin flipper was set to sweep from 0.4995 to 0.5045 and the spin tune was 0.5025. The final to initial polarization ratio was measured as function of *D* and the results are shown in Fig. 5.27. The spin flipper sweep time was fixed as 3 seconds during these measurements. It clearly demonstrates that the *D* suppression is critical to achieve a high spin flip efficiency. For a normal lattice where the *D* was large, the polarization was lost with a single spin flipper sweep.

With the 0.005 tune sweep range and the given spin flipper strength, a 99% spin flip efficiency is predicted for a sweep time of 0.6 second or longer at 24 GeV from Eq. (5.28) and numerical simulations [34]. The final to initial polarization ratio from Eq. (5.28) for the given spin flipper strength at injection is plotted in Fig. 5.28 as solid line. But this is an over-simplified model. In reality, the synchrotron motion and residual spin tune spread can have an impact on the final spin flip efficiency. The measured spin flip efficiencies for three different sweep times are also shown in Fig. 5.28 [35]. Each efficiency is the average of 10 to 12 spin flip measurements. The best final to initial polarization ratio <sup>−</sup>97*.*<sup>5</sup> <sup>±</sup> <sup>1</sup>*.*9% was obtained with a 1 second sweep time . This is close to the simple model prediction of −99%. At 0.5 second, the final to initial polarization ratio is expected to be slightly worse due

**Fig. 5.27** The average final to initial polarization ratio for 3 seconds sweep time at injection as function of *D*' at the two Siberian Snakes. The small *D* is critical for full spin flip

**Fig. 5.28** The average final to initial polarization ratio at 24 GeV and 255 GeV. The solid line is the polarization flip ratio from Eq. (5.28) for the resonance strength 0.00024 and the filled points are the averaged spin flip efficiencies for three different sweep times at 24 GeV. The dashed line and open points are for 255 GeV and the resonance strength 0.00057

to faster crossing speed, and the measured value <sup>−</sup><sup>95</sup> <sup>±</sup> <sup>2</sup>*.*6% is indeed slightly smaller. For the slowest sweep time, 3 seconds, the final to initial polarization ratio is only <sup>−</sup>92*.*<sup>0</sup> <sup>±</sup> <sup>1</sup>*.*5%. There are several reasons for this. First, with a slower sweep speed, multiple spin resonance crossings with different resonance crossing speeds can happen due to the synchrotron oscillation. Second, the polarization loss from weak higher order depolarizing resonances would be enhanced with a slow sweep speed.

The final to initial polarization ratio obtained from the given spin flipper strength at 255 GeV is plotted in Fig. 5.28 as dashed line. The spin flip efficiencies for the two different sweep times are also shown in Fig. 5.28. As before, each efficiency is the average of 10 to 12 spin flip measurements. The better final to initial polarization ratio <sup>−</sup>97*.*<sup>2</sup> <sup>±</sup> <sup>3</sup>*.*1% was obtained at the 0.5 second sweep time. This is close to the simple model prediction of −99%. For the slower sweep time of 1 second the final to initial polarization ratio is <sup>−</sup>90*.*<sup>2</sup> <sup>±</sup> <sup>2</sup>*.*8%. Similar to the 24 GeV case, the final to initial polarization ratio is worse with slow sweep speed.

# *5.4.2 Spin Tune Measurement*

In principle, the spin tune can be measured with a similar idea as the betatron tune measurement: measuring the spin response to a driven spin coherence. Such a method can also be non-destructive. A coherent spin precession around the vertical direction can be adiabatically induced by driving the AC spin rotator at a drive tune near the spin tune.

If the undisturbed stable spin direction on the designed orbit is vertical, the vertical component of polarization *P* in the neighborhood of an isolated spin resonance is given by Lee [20] and Bai and Roser [29]:

$$P\_{\rm y} = \frac{\nu\_{\rm sp} - \nu\_{\rm osc}}{\sqrt{|\nu\_{\rm sp} - \nu\_{\rm osc}|^2 + |\epsilon|^2}},\tag{5.36}$$

where is the strength of the driven spin resonance and *ν*osc is the drive tune. The horizontal component oscillates with *ν*osc:

$$P\_{\chi} = \frac{|\epsilon|}{\sqrt{|\nu\_{\rm sp} - \nu\_{\rm osc}|^2 + |\epsilon|^2}} \cos(2\pi \nu\_{\rm osc} i - \Psi) \,, \tag{5.37}$$

where *i* is the *i*th orbital revolution and is the initial phase offset. Equations (5.36) and (5.37) describe the vertical and horizontal components in a perfect accelerator in the presence of a single isolated spin resonance. The ratio of *P*ˆ *<sup>x</sup>* and *Py* gives the difference between *νs* and *ν*osc:

$$\tan \theta\_0 = \frac{\hat{P}\_{\chi}}{P\_{\chi}} = \frac{|\epsilon|}{\nu\_{\s} - \nu\_{\text{osc}}} \,, \tag{5.38}$$

where *θ*<sup>0</sup> is the opening angle of the polarization vector. With the known resonance strength from the spin flipper and the drive tune *ν*osc, the spin tune *ν*sp can be derived from the measured quantity tan *θ*0.

This technique has two advantages. First, it is an adiabatic spin manipulation and preserves the beam polarization. Second, it is a relatively fast measurement. Hence, this technique is ideal for measuring the spin tune at the store energy of a high-energy polarized synchrotron, such as RHIC or a future polarized electron ion collider [36]. The spin tune measurement with coherent spin motion has been used for deuteron beams [37] at low energy (∼1 GeV) in COSY, although the coherent spin motion was not driven. Here the first spin tune measurement at high energies (24 and 255 GeV) for protons in RHIC using a driven coherent spin motion will be discussed as examples [38].

The focus of this experiment is to measure *θsp*, the azimuthal angle of the spin vector in the plane transverse to the beam moving direction, and understand how it is influenced by the coherent spin motion. To measure the driven coherent spin motion, recoil carbon events from the proton-carbon (pC) polarimeter [39] need to be recorded on a turn-by-turn basis. The polarimeter related information can be found in Chap. 12 for the hadron polarimeter. Figure 5.29 shows the spin precession projected onto the *x*-*y* plane transverse to the beam direction. The pC polarimeter measures the spin vector projection in this plane. With a driven coherent spin motion the spin vector in this plane oscillates over the range shown by the two dashed arrows, with a period equal to that of the driven resonance. The amplitude of the precession is *θ*<sup>0</sup> from Eq. (5.38); *θ*tilt is an arbitrary offset between vertical and the stable spin direction. From *P*ˆ *<sup>x</sup> /Py* the spin azimuthal angle *θsp* measured by the pC polarimeter with a possible tilt angle *θ*tilt will follow the precession

$$\frac{\hat{P}\_{\chi}}{P\_{\chi}} = \tan(\theta\_{sp} - \theta\_{\text{illt}}) = \tan\theta\_0 \cos(2\pi\,\upsilon\_{\text{osc}}i - \Psi) \,. \tag{5.39}$$

**Fig. 5.29** Projection of the spin vector into the transverse plane when the spin tune is near a spin resonance. The spin oscillates around the stable spin direction (solid arrow) between the two boundaries (dashed arrows) over many orbit turns **0**

Note that only the two transverse components of the polarization can be measured. If the spin direction has a significant longitudinal component in addition to the angle *θ*tilt, the simple form of Eq.(5.39) should be modified.

The experiment was carried out at injection energy of 24 GeV and the store energy of 255 GeV. The revolution frequency in RHIC is about 78.20 kHz. The bunch pattern was 120 bunches in the ring and RHIC bunch crossings were used as a clock signal for the analysis. For these measurements, a signal from the resonance drive was provided to the polarimeter readout, which allowed the alignment of the phase of carbon hits within one period of the resonance drive. The drive signal was read with an accuracy of two bunch crossings, whereas the typical period of the drive was ∼240 bunch crossings (for a drive tune near 0.5), so the phase of carbon hits was known to within 1% of a period.

Figure 5.30 shows *θsp* versus one cycle of drive phase for one drive setting. To improve the statistical accuracy, the carbon hits were grouped in six bins of 40 bunch crossings, spanning nearly one entire drive cycle; the mean spin azimuthal angle *θsp* was measured for each bin. The curve is fit to the function, from rearrangement of Eq. (5.39):

$$\theta\_{sp}(i) = \theta\_{\text{ult}} + \tan^{-1}[\tan \theta\_0 \cos(2\pi \,\nu\_{\text{osc}} i - \Psi)]. \tag{5.40}$$

The arbitrary phase offset depends on the propagation time of proton bunches from the drive to the polarimeter, and the cable delay of the signal from the drive to the polarimeter readout. With the measured *<sup>θ</sup>*<sup>0</sup> <sup>=</sup> <sup>0</sup>*.*<sup>1338</sup> <sup>±</sup> <sup>0</sup>*.*<sup>01519</sup> and the driving tune at 0.498, the spin tune can be derived from Eq. (5.38) as <sup>0</sup>*.*4998±0*.*0002, fairly close to 0.5.

Driven coherent spin motion has been used to measure the spin tune in RHIC at 24 and 255 GeV. The results show that the spin tune can be measured by driven spin coherence when the tune separation is small enough. The drive tune needs to be close to the spin tune, which requires a small spin tune spread. In RHIC, where a pair of Siberian snakes are used, the small spin tune spread was achieved by the reduction of the dispersion slope difference at the two Siberian snakes [32, 33]. These experimental results prove that it is possible to routinely measure the spin tune of polarized proton beams—the most important polarized beam parameter. This will lead to more stable and optimized operations of a high-energy polarized collider, such as RHIC or a future polarized electron ion collider.

# **5.5 Summary**

The preservation of polarization through the acceleration can be divided into two big categories. The first one is to reduce or eliminate the effect of spin resonances. Harmonic orbit correction, fast acceleration, radial jump, tune jump and full snake are the mechanisms that can be applied in this category. Among them, the harmonic orbit correction could be tedious if many are needed. The fast tune jump could lead to a emittance growth as this is a non-adiabatic operation. The full snake eliminates the resonance condition completely but the higher order resonances called snake resonances are still present which requires special optical design to avoid and mitigate them. The second category is to enhance the resonance strength. AC dipole, partial snake (weak or strong) are in this category. An AC dipole requires a large machine aperture and/or reasonable strong resonance strengths to overcome intrinsic resonances, which in reality can not always be met. Most of these methods are based on the Froissart-Stora formula. This formula is also the basis of spin manipulation in a synchrotron. The examples of spin flip and spin tune measurement were presented and discussed.

# **5.6 Homework**

# • **? Exercise 1: Polarization of a Gaussian Beam**

For a Gaussian distribution, derive the Froissart-Stora formula for the whole beam, namely, Eq.(5.3).

### **Solution**

In the integrand of *< Pf /Pi >*, Eq.(5.1):


Equation (5.1) can thus be recast under the form

$$ = \int\_0^\infty \exp\frac{-\varepsilon}{2\varepsilon\_0} \left(1 + \frac{\pi|\epsilon(\varepsilon\_0)|^2}{\alpha}\right) \frac{d\varepsilon}{\varepsilon\_0} - \underbrace{\int\_0^\infty \rho(\varepsilon) \,d\varepsilon}\_{=1}$$

Introduce the change of variable *<sup>ε</sup>* 2*ε*<sup>0</sup> *(*<sup>1</sup> <sup>+</sup> *<sup>π</sup>*|*(ε*0*)*<sup>|</sup> 2 *<sup>α</sup> )* <sup>=</sup> *<sup>x</sup>*, then *dε <sup>ε</sup>*<sup>0</sup> <sup>=</sup> <sup>2</sup> <sup>1</sup>+*π*|*(ε*0*)*|<sup>2</sup> *α dx*. Substituting into the integral above gives the expected result:

$$ = \frac{2}{1 + \frac{\pi |\epsilon(\varepsilon\_0)|^2}{\alpha}} \int\_0^\infty e^{-\chi} d\chi - 1 = \frac{1 - \frac{\pi |\epsilon(\varepsilon\_0)|^2}{\alpha}}{1 + \frac{\pi |\epsilon(\varepsilon\_0)|^2}{\alpha}}$$

# • **? Exercise 2: Harmonic Orbit Correction, Experimental Data**

Tables 5.1 and 5.2 provide the experimental data from a scan of the vertical third harmonics (the cos3v and sin3v components of the vertical closed orbit) in the AGS Booster. The polarization is given in an arbitrary unit. Actually, it is called asymmetry and needs to be divided by the so-called analyzing power to give a polarization value between −1 and +1. Use the Eq. (5.6) to fit these data. The exercise is to find the corrector current value *I*<sup>0</sup> (i.e., *Ic*<sup>0</sup> and *Is*<sup>0</sup> for respectively the cosine and sine corrector families) to be used for a full correction of the third orbit harmonic. For this purpose, we don't care about the unit of the polarization. There are three parameters for the data fitting (Eq.(5.7)): *Pi*, *I*<sup>0</sup> and *σ*. Among the three parameters, *I*<sup>0</sup> is the most important one and *σ* provides sensitivity of the polarization to the variation of the particular harmonic component. If possible, plot the fitted curve and experiment data together on one plot.

### **Solution**

The harmonic scan data need to be fitted with the following equation for the sine and cosine components (see Eqs.(5.6) and (5.7)):

$$P\_f = p\_0 \left( 2 \exp \frac{-\pi \left( I - p\_1 \right)^2}{2 p\_2^2} - p\_3 \right)^2$$

The fitting results are shown in Figs. 5.31 and 5.32. The experimental data of sin3v was taken first followed by cos3v data taking. The optimized sin3v setting was put in before cos3v scan. As one can see, the parameter *p*<sup>3</sup> (Eq.(5.7)) in the cos3v fitting is close to 1 as expected.

Note that since the *p*<sup>0</sup> and *p*<sup>3</sup> parameters are correlated, one can get different sets of *p*<sup>0</sup> and *p*<sup>3</sup> from the fitting.

### **Table 5.1** 3rd harmonic sine current scan



**Table 5.2** 3rd harmonic

**Fig. 5.31** The fitting results for sin3v data. The fitting parameter values are given at the top of the plot

**Fig. 5.32** The fitting results for cos3v data. The fitting parameter values are given at the top of the plot

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 6 Electron Polarization**

### **Fanglei Lin**

**Abstract** This chapter focuses on the introduction and discussion of electron polarization. In addition to the gyromagnetic ratio, the most different character of electrons compared to protons is that electrons radiate electromagnetic energy in a circular accelerator. A very small correction has to be applied to the electron spin flip to account for the synchrotron radiation. The different instantaneous spin flip probabilities, up to down and down to up, can build up the electron beam polarization state. However, mostly synchrotron radiation tends to disturb the electron orbital motion that is eventually balanced by the radiation damping along an equilibrium orbit. The electron spin motion is described by the modified Thomas-BMT equation with the radiative spin transition term included. Detail of the electron (de)polarization phenomena is described in this chapter. The lecture is extracted from various early theoretical papers, lectures, thesis and presentations (Lee, Accelerator Physics. World Scientific Publishing, 1999; Buon and Koutchouk, Polarization of Electron and Proton Beams. CERN-SL-94-80-AP, 1994; Montague, Phys. Rep. 113(1):1–96, 1984; Lee, Spin Dynamics and Snakes in Synchrotrons. World Scientific Publishing, 1997; Barber and Ripken, Handbook of Accelerator Physics and Engineering, 1st edn. World Scientific Publishing, 2006; Barber, An Introduction to Spin Polarisation in Accelerators and Storage Rings. Cockcroft Institute Academic Training Winter Term, 2014; Mane, Nucl. Instr. Methods Phys. Res. A 292:52–74, 1990; Berglund, Spin-Orbit Maps and Electron Spin Dynamics for the Luminosity Upgrade Project at HERA. DESY-THESIS-2001-044, 2001; Electron-Ion Collider Conceptual Design Report, 2020).

https://doi.org/10.1007/978-3-031-16715-7\_6

155

Fanglei Lin (-)

Neutron Sciences, Oak Ridge National Laboratory, Oak Ridge, TN, USA e-mail: linf@ornl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection,

# **6.1 Synchrotron Radiation**

One key aspect of electrons differing from ions in a circular accelerator is that electrons emit much more synchrotron radiation in dipoles. The energy loss of electrons due to the radiation is restored in the RF cavities. Synchrotron radiation spans a continuous spectrum. As shown in Fig. 6.1, the integrated spectral density up to the critical frequency *ωc* contains half of the total radiated energy, with the peak occurring approximately at 0*.*3*ωc*.

The critical photon energy is given by

$$
\mu\_c = \hbar \omega\_c = \frac{3}{2} \frac{\hbar c}{\rho} \chi^3. \tag{6.1}
$$

For electrons, the critical energy in practical units is

$$
\mu\_c \text{[keV]} = 2.218 \frac{E^3 \text{[GeV]}}{\rho \text{[m]}} = 0.665 \cdot E^2 \text{[GeV]} \cdot B \text{[T]}.\tag{6.2}
$$

The radiation spectrum falls off exponentially beyond *ωc* as *e*−*ω/ωc* with the total integrated radiation power of

$$P\_{classical} = \frac{cC\_VR^4}{2\pi\rho^2},\tag{6.3}$$

**Fig. 6.1** Integrated spectral density from the synchrotron radiation of electrons

### 6 Electron Polarization 157

where *Cr* <sup>=</sup> <sup>4</sup>*π re* <sup>3</sup>*(mc*2*)*<sup>3</sup> <sup>=</sup> <sup>8</sup>*.*<sup>85</sup> <sup>×</sup> <sup>10</sup>−<sup>5</sup> <sup>m</sup> *(*GeV*)*<sup>3</sup> . The total energy radiated in one revolution becomes [1]

$$U\_0 = \frac{C\_r E^4}{2\pi} \oint \frac{ds}{\rho^2}.\tag{6.4}$$

The synchrotron radiation is basically a quantum mechanical process. When photons are emitted, the energy of the electron will decrease by the same discrete amount. The corresponding instantaneous radiation power will be reduced. To the first order in *<sup>h</sup>*¯, the quantum correction to the radiation power is given by Lee [2]

$$P\_{qm} = P\_{classical} (1 - \frac{\mathfrak{F}\mathfrak{H}a\_{\mathbb{C}}}{8\sqrt{\mathfrak{Z}}E}) . \tag{6.5}$$

The quantum correction factor is of the order of 10−<sup>5</sup> and can not be easily measured. However, the quantum effect is observable in the phase space, where an equilibrium distribution is eventually reached in a balance between radiation damping (a classical phenomenon) and radiation excitation (a quantum mechanical effect) within a few damping times. The corresponding damping time constants in all three dimensions are [1]

$$\begin{aligned} \tau\_{\chi} &= \frac{2E}{J\_{\chi}U\_{0}}T\_{0}, \\ \tau\_{\chi} &= \frac{2E}{J\_{\chi}U\_{0}}T\_{0}, \\ \tau\_{E} &= \frac{2E}{J\_{E}U\_{0}}T\_{0}, \end{aligned} \tag{6.6}$$

where *E* is the electron energy, *U*<sup>0</sup> is the energy loss in one revolution, *T*<sup>0</sup> is the revolution period, *Jx* <sup>=</sup> <sup>1</sup> <sup>−</sup> *D, Jy* <sup>=</sup> <sup>1</sup>*, JE* <sup>=</sup> <sup>2</sup> <sup>+</sup> *<sup>D</sup>* are the horizontal, vertical and longitudinal damping partition numbers respectively, and *<sup>D</sup>* <sup>=</sup> <sup>1</sup> 2*π* dipoles *Dx (s) <sup>ρ</sup>*2*(s) ds* is the integral evaluated in dipoles where quadrupole focusing and/or defocusing effects are not considered.

The horizontal beam emittance and fractional energy spread in a planar accelerator are given by Lee [1]

$$\begin{aligned} \varepsilon\_{\chi} &= C\_{q} \gamma^{2} \frac{\oint \frac{H}{|\rho|^{3}} ds}{J\_{\chi} \oint \frac{1}{\rho^{2}} ds}, \\\ (\frac{\sigma\_{E}}{E})^{2} &= C\_{q} \gamma^{2} \frac{\oint \frac{1}{|\rho|^{3}} ds}{J\_{E} \oint \frac{1}{\rho^{2}} ds}. \end{aligned} \tag{6.7}$$

Here *Cq* <sup>=</sup> <sup>3</sup>*.*<sup>84</sup> <sup>×</sup> <sup>10</sup>−13m. The dispersion *<sup>H</sup>*-function is defined as *<sup>H</sup>* <sup>=</sup> *γxD*<sup>2</sup> *x* + 2*αxDxD <sup>x</sup>* <sup>+</sup> *βxD* 2 *<sup>x</sup>* . *βx, αx , γx* are the horizontal Twiss parameters and *Dx* and *D x* are the horizontal dispersion and its derivative, respectively. Note that the natural vertical emittance is orders of magnitude smaller than the horizontal one in a planar accelerator and ignored unless vertical emittance is excited on purpose.

# **6.2 Spin-Dependent Synchrotron Radiation**

The electron has an intrinsic spin quantum number carrying the angular momentum. With the spin correction included, the radiation power is given by Eq. (6.8). Averaging overall spin orientations for an unpolarized beam, Eq. (6.8) reduces to Eq. (6.5). Spin dependent synchrotron radiation power is very small, however, the disparity of instantaneous spin flip transition rate is significant [2, 3].

$$P\_{qm} = P\_{classical} \left[ 1 - (\frac{\mathbf{55}}{8\sqrt{3}} + \mathbf{S} \cdot \mathbf{z}) \frac{\hbar \alpha\_c}{E} \right]. \tag{6.8}$$

Ternov et al. [4] discovered that the probability for an electron to emit a photon depends slightly on the initial spin state of the electron. In 1964, Sokolov and Ternov [5] completed the formula of the rate of photon emission for an electron with given initial *si* and final *sf* spin states in the direction of the magnetic field

$$w(\mathbf{s}\_l, \mathbf{s}\_f) = \frac{5\sqrt{3}}{6} \frac{e^2 c}{\hbar c \rho} \frac{E}{m\_e c^2} \begin{cases} (\text{if } s\_l = s\_f) & 1 - \frac{16\sqrt{3}}{45} \xi + \frac{25}{18} \xi^2 - \frac{s\_f}{5} (1 - \frac{20\sqrt{3}}{9} \xi) \xi \\ (\text{if } s\_l \neq s\_f) & \frac{1}{6} (1 - s\_f \frac{8\sqrt{3}}{15}) \xi^2 \end{cases} \tag{6.9}$$

where *<sup>ξ</sup>* <sup>=</sup> *hω*¯ *c/E*. *<sup>ξ</sup>* is very small in general, for example <sup>10</sup>−<sup>6</sup> for the electron beam energy at 45 GeV. Three messages are delivered from Eq. (6.9):


Note that the probability for spin flipping (*w*↑↓: spin flips from up <sup>↑</sup> to down <sup>↓</sup> and *<sup>w</sup>*↓↑: spin flips from down <sup>↓</sup> to up <sup>↑</sup>) versus non-spin flipping (*w*↑↑: spin flips from up <sup>↑</sup> to up <sup>↑</sup>, and *<sup>w</sup>*↓↓: spin flips from down <sup>↓</sup> to down <sup>↓</sup>) events is very small, in an order of 10−<sup>12</sup> given in Eq. (6.10). However, in the case of spin flip for electrons, the preference of *<sup>A</sup>* <sup>≈</sup> <sup>92</sup>*.*4% for the spin state is antiparallel to the magnetic field. A stored positron beam can become polarized as well as an electron beam, with the direction of polarization parallel to the magnetic field.

$$\frac{w\_{\uparrow\downarrow} + w\_{\downarrow\uparrow}}{w\_{\uparrow\uparrow} + w\_{\downarrow\downarrow}} \sim \mathfrak{g}^2 \tag{6.10}$$

$$A = \frac{w\_{\uparrow\downarrow} - w\_{\downarrow\uparrow}}{w\_{\uparrow\downarrow} + w\_{\downarrow\uparrow}} = \frac{8}{\mathfrak{s}\sqrt{3}} \approx 0.924\tag{6.11}$$

# **6.3 Sokolov-Ternov Effect**

Simplify the conditions with the homogeneous magnetic field and absence of depolarizing effects, the dynamics of polarization can be calculated from Eq. (6.9). At a given time, the beam polarization and its time derivative are:

$$P = \frac{N\gamma - N\downarrow}{N},\tag{6.12}$$

$$\frac{dP}{dt} = \frac{1}{N} (\frac{dN\_{\uparrow}}{dt} - \frac{dN\_{\downarrow}}{dt}).\tag{6.13}$$

*<sup>N</sup>*<sup>↑</sup> and *<sup>N</sup>*<sup>↓</sup> are the numbers of electrons with spin up and spin down, respectively. Their rates of change may be deduced from the transition probabilities in Eq. (6.9):

$$\frac{dN\_{\uparrow}}{dt} = N\_{\downarrow}w\_{\downarrow\uparrow} - N\_{\uparrow}w\_{\uparrow\downarrow} = Nw\_{\downarrow\uparrow} - N\_{\uparrow}(w\_{\downarrow\uparrow} + w\_{\uparrow\downarrow}),\tag{6.14}$$

$$\frac{dN\_{\downarrow}}{dt} = Nw\_{\uparrow\downarrow} - N\_{\downarrow}(w\_{\downarrow\uparrow} + w\_{\uparrow\downarrow}).\tag{6.15}$$

Then, the growth of the polarization is

$$P(t) = A(1 - e^{-t/\tau\_p}).\tag{6.16}$$

The maximum degree of polarization is equal to the asymmetry *<sup>A</sup>* <sup>=</sup> <sup>8</sup> 5 √ <sup>3</sup> <sup>≈</sup> <sup>0</sup>*.*924. The characteristic time *τp* (noted *τst* to distinguish it from other characteristic times to be further introduced) of the polarization build-up is given by

$$\tau\_p^{-1} = \tau\_{st}^{-1} = (w\_{\uparrow\downarrow} + w\_{\downarrow\uparrow}) = \frac{5\sqrt{3}}{8} \frac{\lambda}{2\pi} \frac{cr\_e \gamma^5}{|\rho|^3} = \frac{5\sqrt{3}}{8} \frac{\hbar r\_e \gamma^5}{m\_e |\rho|^3} \tag{6.17}$$

The guiding field in a real accelerator is piece-wise constant, with changes of its strength and polarity. In the most common cases, the build-up polarization and time


**Table 6.1** Characteristic parameters of past and future polarized electron storage rings

due to the Sokolov-Ternov effect [5] can be generalized as

$$P\_{st} = -\frac{8}{5\sqrt{3}} \frac{\oint \frac{ds}{\rho^3(s)}}{\oint \frac{ds}{|\rho(s)|^3}},\tag{6.18}$$

$$
\pi\_{\rm sf}^{-1} = \frac{5\sqrt{3}}{8} \frac{\hbar r\_e \nu^{\rm sf}}{m\_e C} \oint \frac{ds}{|\rho(s)|^3}. \tag{6.19}
$$

Here *C* is the accelerator circumference and *re* is the classical electron radius.

Table 6.1 lists several characteristic parameters of several electron storage rings. Note that the polarization build-up time is much longer than the phase space damping time in an electron storage ring. Typically, the polarization build-up time is of the order of minutes to hours, while the phase space damping time is of the order of milliseconds.

# **6.4 Baier-Katkov-Strakhovenko Equation**

In the late 1960s, Baier, Katkov and Strakhovenko (BKS) [6] generalized the spinflip transition probability from the uniform magnetic fields to arbitrary magnetic field configurations. The general equation of evolution of electron polarization is derived as follows, in the presence of radiative polarization and absence of depolarizing effects due to the stochastic photon emission on the orbit [7]:

$$\frac{d\mathbf{P}}{dt} = \mathbf{\hat{a}}\_{co} \times \mathbf{P} - \frac{1}{\tau\_{\rm sI}(s)} [\mathbf{P} - \frac{2}{9} \mathbf{s}(\mathbf{P} \cdot \mathbf{s}) + \frac{8}{5\sqrt{3}} \mathbf{b}(s)].\tag{6.20}$$

The first part of the equation is the standard Thomas-BMT equation on the closed orbit, which can be solved in the form of **<sup>P</sup>***(s)* <sup>=</sup> *<sup>R</sup>co* <sup>3</sup>×3*(s, s*0*)***P***(s*0*)*, described in the early chapters in this book. Here *Rco* <sup>3</sup>×3*(s, s*0*)* is the <sup>3</sup> <sup>×</sup> <sup>3</sup> spin transfer matrix on the closed orbit. The second part of the equation describes the polarization motion with the spin flipping rate given by Baier and Katkov.

### 6 Electron Polarization 161

The BKS equation does not contain depolarizing terms, however, a derivation of its solution is a useful step towards incorporating the spin-orbit coupling depolarization effect. We replace *t* with *θ*, commonly used to describe the particle motions in an accelerator, as the independent variable in the Eq. (6.20), then the instantaneous polarization build-up rate is given by

$$
\pi\_{ip}^{-1} = \frac{\mathfrak{F}\sqrt{3}}{8} \frac{R\hbar r\_e \nu^S}{m\_e c \rho^3},
\tag{6.21}
$$

where *R* is the average radius of the machine. Choosing the unit reference vectors (**e**1*,* **e**2*,* **n**0) with respect to that the spin precesses at a constant rate *ν*0, we have *co* <sup>=</sup> *<sup>ν</sup>*0**n**<sup>0</sup> and the equation of motion for the electron polarization is written as

$$\frac{d\mathbf{P}}{d\theta} = \nu\_0 \mathbf{n}\_0 \times \mathbf{P} - \frac{1}{\tau\_{lp}} [\mathbf{P} - \frac{2}{9} \mathbf{s}(\mathbf{P} \cdot \mathbf{s}) + \frac{8}{5\sqrt{3}} \mathbf{b}(s)].\tag{6.22}$$

Making the scalar product of **n**<sup>0</sup> yields the equation of evolution for the projection of **<sup>P</sup>** on the closed solution **<sup>n</sup>**0, that is *<sup>P</sup>*<sup>3</sup> <sup>=</sup> **<sup>n</sup>**<sup>0</sup> · **<sup>P</sup>**

$$\frac{dP\_3}{d\theta} = -\frac{1}{\tau\_{lp}} \{P\_3 \{ 1 - \frac{2}{9} (\mathbf{n}\_0 \cdot \mathbf{s})^2 \} + \frac{8}{5\sqrt{3}} (\mathbf{n}\_0 \cdot \mathbf{b}) - \frac{2}{9} (\mathbf{n}\_0 \cdot \mathbf{s}) \{ P\_1 + P\_2 \} \}. \tag{6.23}$$

In most cases, *τ* <sup>−</sup><sup>1</sup> *ip* is very small compared to *ν*0. Hence, the fast-oscillating components *P*<sup>1</sup> and *P*<sup>2</sup> transverse to **n0** make a negligible contribution if Eq. (6.23) is averaged over one revolution and initial spin phases, then the third term can be dropped consequently

$$\frac{dP\_3}{d\theta} = -\frac{1}{\tau\_{lp}}[P\_3(1 - \frac{2}{9}(\mathbf{n}\_0 \cdot \mathbf{s})^2) + \frac{8}{5\sqrt{3}}(\mathbf{n}\_0 \cdot \mathbf{b})].\tag{6.24}$$

For the initial condition of *<sup>P</sup>*3*(*0*)* <sup>=</sup> 0, Eq. (6.24) can be integrated to yield

$$P\_3 = -\frac{B}{A}(1 - e^{-A\theta}).\tag{6.25}$$

Since *τ* <sup>−</sup><sup>1</sup> *ip* is small, the coefficients *A* and *B* can be expressed as averages over the machine circumference as

$$\begin{split} A &= \frac{5\sqrt{3}}{8} \frac{R \hbar r\_e \nu^{\frac{\sigma}{6}}}{m\_e c} \oint ds \frac{1 - \frac{2}{9} (\mathbf{n}\_0(\mathbf{s}) \cdot \mathbf{s})^2}{|\rho(\mathbf{s})|^3}, \\ B &= \frac{R \hbar r\_e \nu^{\frac{\sigma}{6}}}{m\_e c} \oint ds \frac{\mathbf{n}\_0(\mathbf{s}) \cdot \mathbf{b}(\mathbf{s})}{|\rho(\mathbf{s})|^3}. \end{split} \tag{6.26}$$

The asymptotic polarization for *<sup>θ</sup>* −→ ∞ becomes [8]

$$P\_{bks} = P\_3(\infty) = -\frac{B}{A} = -\frac{8}{5\sqrt{3}} \frac{\oint ds \frac{\mathbf{n}\_0(s) \cdot \mathbf{b}(s)}{|\rho|^5}}{\oint ds \frac{1 - \frac{2}{\sqrt{3}} (\mathbf{n}\_0(s) \cdot \mathbf{s})^2}{|\rho(s)|^5}},\tag{6.27}$$

with the BKS polarization build-up rate of [8]

$$\tau\_{bks}^{-1} = \frac{5\sqrt{3}}{8} \frac{\hbar r\_e \nu^5}{m\_e C} \oint ds \frac{1 - \frac{2}{\mathfrak{F}} (\mathbf{n}\_0(\mathbf{s}) \cdot \mathbf{s})^2}{|\rho(\mathbf{s})|^3}. \tag{6.28}$$

Comments on the BKS equation:


# **6.5 Spin Diffusion**

# *6.5.1 Spin Perturbation by Quantum Excitation*

There are two distinct aspects related to the synchrotron radiation that modify depolarizing effects for electrons as compared with protons: sudden change of the energy due to the photon emission on the one hand and much slower energy recovery from the RF system on the other hand. As described in Eq. (6.9), the majority of photon emission is not associated with a spin flip. The abrupt energy jump causes the electron to initiate additional synchrotron and betatron oscillations since the closed orbit is in general energy dependent. During the subsequent evolution of the trajectory, the electron is subjected to a different sequence of magnetic fields from that corresponding to the original closed orbit, and the spin motion is consequently perturbed with respect to the initial state. The recovery of the lost energy from the RF system is accompanied by damping of orbit oscillations, and the electron damps to its initial orbit after several damping times. During the orbital damping time, the spin precesses many times and follows adiabatically the slow changes in magnetic field experienced by the electron. However, there is no damping of the spin motion: electron spin depends on the whole of its history following the photon emission and ends up with a different orientation from its initial one. The whole process can be explained by Fig. 6.2 Buon and Koutchouk [3].

The first row of Fig. 6.2 represents the initial state of the particle in the phase space just before the photon emission: the particle is at the origin of the coordinates (i.e. the closed orbit) and the spin **S** is along an axis **n** to be vertical.

The second row of Fig. 6.2 presents the particle state just after the photon emission. The energy coordinate suddenly become negative due to the energy loss. The position of the particle does not change during the short time of photon emission. However, the closed orbit changes due to the change of particle's energy. This results in the changes of dispersion orbit and betatron amplitude if the dispersion function does not vanish. Particle starts oscillating in the three phase spaces. Along with the new trajectories, the spin **S** is precessing about a new spin axis **n**, generally tilted with respect to the initial spin direction.

**Fig. 6.2** Evolution of the phase space and spin coordinates of a reference particle that emits a photon. The first row represents the initial state of the particle in the phase space just before the photon emission. The second row represents the particle state just after the photon emission. The third row represents the evolution of the coordinates in three phase space over several damping times

The third row of Fig. 6.2 shows the evolution of the coordinates in three phase spaces over several damping times. The spatial and momentum coordinates damp and reach to the equilibrium conditions. During this process, the spin axis **n** is gradually restored to its initial vertical position. However, the spin **S** precesses very rapidly and follows adiabatically the spin axis **n**, and finds itself tilted at an angle when the orbital coordinates are restored. Averaging over all particles in a beam, the horizontal component of polarization vanishes since the spin precesses in a stochastic way as photons are emitted. The remaining polarization is the projection of the initial polarization vector onto the spin axis after it has been tilted by the photon emission. This rather simple picture of depolarization due to the quantum excitation arises because of the very large difference among the time constants of three relevant phenomena: micro-second time scale for one spin precession, millisecond time scale for the damping of orbital motions and the gradual change of the **n**, minutes to hour time scale for the polarization build-up mechanism.

# *6.5.2 Spin-Orbit Coupling Function*

To clarify the definition of **d** introduced by Derbenev and Kondratenko to describe the depolarizing influence of quantized synchrotron radiation in terms of the resulting random fluctuations of the precession axis, we use a simple model of the spin diffusion process: a single electron moving on the normal closed orbit with the design momentum and having its spin aligned along the nominal precession axis **n**<sup>0</sup> corresponding to this orbit, i.e., **n**<sup>0</sup> is the invariant spin field for a particle on the closed orbit. After the emission of photons, the orbit parameters change and so does the precession axis, **n**<sup>0</sup> −→ **n**. Let us assume that the tilt of spin precession direction **<sup>n</sup>** <sup>=</sup> **<sup>n</sup>** <sup>−</sup> **<sup>n</sup>**<sup>0</sup> is proportional to the relative energy loss *E*, then the spin-orbit coupling function **d** is defined as

$$\mathbf{d} = \frac{\partial \mathbf{n}}{\partial \boldsymbol{\delta}}.\tag{6.29}$$

Here *<sup>δ</sup>* <sup>=</sup> *E <sup>E</sup>* . **<sup>d</sup>** <sup>≡</sup> **<sup>d</sup>***(***u**;*s)* is a vectorial quantity which depends on the azimuth *<sup>s</sup>* along the trajectory and summarizes the contributions from the betatron oscillations as well as the synchrotron oscillation **<sup>u</sup>** <sup>≡</sup> *(x, px,y,py , z, δ)*.

The BKS equation describes the evolution of the polarization on the assumption that **n**<sup>0</sup> is constant at any specified azimuth, and is not subject to quantum fluctuations or oscillatory perturbations. In order to introduce the depolarizing effect of the spin-orbit coupling function, we supplement *P*<sup>3</sup> in Eq. (6.24) by an additional contribution *P*<sup>3</sup> arising from the perturbation of **n**, with **n** is the change due to the emission of photons. Following the conclusion drawn from the solution of the BKS equation, this model can also constitute the generalization to the case of an ensemble of electrons with an average projection *<sup>P</sup>*<sup>3</sup> <sup>=</sup>*<sup>&</sup>lt;* **<sup>P</sup>** · **<sup>n</sup>**<sup>0</sup> *<sup>&</sup>gt;*.

### 6 Electron Polarization 165

Since **<sup>n</sup>** is a unit vector and <sup>|</sup>**n**<sup>|</sup> 1, the change *P*<sup>3</sup> in the projection *<sup>P</sup>*<sup>3</sup> arising from **n** is

$$
\Delta P\_3 \approx -P\_3 \frac{|\Delta \mathbf{n}|^2}{2} = -\frac{P\_3}{2} |\mathbf{d}|^2 \delta^2. \tag{6.30}
$$

The rate of change of the energy fluctuation due to the quantum emission can be expressed in terms of the azimuthal variable *θ* from Eq. (6.21):

$$\frac{d\delta^2}{d\theta} = \frac{55}{24\sqrt{3}} \frac{R\hbar r\_e \gamma^5}{m\_e c \rho^3} = \frac{11}{9} \frac{1}{\tau\_{lp}}.\tag{6.31}$$

Using Eq. (6.31) in Eq. (6.30), the fluctuation term can be obtained

$$\frac{d\Delta P\_3}{d\theta} = -\frac{11}{18} \frac{|\mathbf{d}|^2}{\tau\_{lp}} P\_3,\tag{6.32}$$

which can be introduced into the BKS equation Eq. (6.24) to obtain

$$\frac{dP\_3}{d\theta} = -\frac{1}{\pi\_{lp}}[P\_3(1 - \frac{2}{9}(\mathbf{n} \cdot \mathbf{s})^2 + \frac{11}{18}|\frac{\partial \mathbf{n}}{\partial \delta}|^2] + \frac{8}{5\sqrt{3}}(\mathbf{n} \cdot \mathbf{b})].\tag{6.33}$$

The solution is similar to the BKS equation but now with

$$\begin{split} A &= \frac{5\sqrt{3}}{8} \frac{R \hbar r\_e \nu^{\mathcal{S}}}{m\_e c} \oint ds \left\langle \frac{1 - \frac{2}{\mathfrak{P}} (\mathbf{n} \cdot \mathbf{s})^2 + \frac{11}{18} |\frac{\partial \mathbf{n}}{\partial \boldsymbol{\delta}}|^2}{|\rho(\boldsymbol{s})|^3} \right\rangle\_s, \\ B &= \frac{R \hbar r\_e \nu^{\mathcal{S}}}{m\_e c} \oint ds \left\langle \frac{\mathbf{n} \cdot \mathbf{b}}{|\rho(\boldsymbol{s})|^3} \right\rangle\_s. \end{split} \tag{6.34}$$

*A* and *B* are expressed as averages over the machine circumference, as well as phase space at every azimuth *s*. The asymptotic polarization level is reduced to

$$P\_{dk} = P\_3(\infty) = -\frac{B}{A} = -\frac{8}{5\sqrt{3}} \frac{\oint ds \left< \frac{\mathbf{n} \cdot \mathbf{b}}{\left| \rho(s) \right|^3} \right>\_{s}}{\oint ds \left< \frac{1 - \frac{2}{9} (\mathbf{n} \cdot \mathbf{s})^2 + \frac{11}{18} \frac{\partial \mathbf{n}}{\partial s} |^2}{\left| \rho(s) \right|^3} \right>\_{s}}. \tag{6.35}$$

Note that, a value of |**d**| around unity results in a substantial reduction of the asymptotic polarization level.

The corresponding effective polarization rate becomes [8]

$$\pi\_{dk}^{-1} = \frac{5\sqrt{3}}{8} \frac{\hbar r\_e \nu^S}{m\_e C} \oint ds \left\langle \frac{1 - \frac{2}{9} (\mathbf{n} \cdot \mathbf{s})^2 + \frac{11}{18} |\frac{\partial \mathbf{n}}{\partial \delta}|^2}{|\rho(\mathbf{s})|^3} \right\rangle\_s. \tag{6.36}$$

It can be written as

$$
\pi\_{dk}^{-1} = \pi\_{bks}^{-1} + \pi\_{dep}^{-1},\tag{6.37}
$$

where *τ* <sup>−</sup><sup>1</sup> *bks* is given Eq. (6.28) and

$$\tau\_{dep}^{-1} = \frac{5\sqrt{3}}{8} \frac{\hbar r\_e \nu^S}{m\_e C} \oint ds \left\langle \frac{\frac{11}{18} |\frac{\partial \mathbf{n}}{\partial \delta}|^2}{|\rho(s)|^3} \right\rangle\_s. \tag{6.38}$$

The time dependence of build-up of polarization from an initial polarization *P*<sup>0</sup> to equilibrium is [8]

$$P(t) = P\_{dk}[1 - e^{-t/\tau\_{dk}}] + P\_0 e^{-t/\tau\_{dk}} \tag{6.39}$$

Figure 6.3 shows the time scales for an electron storage ring of 25 GeV: ranging from 10−<sup>10</sup> s for the duration of the quantum emission process to over 10<sup>4</sup> s for a desired depolarization time that exceeds the polarization build-up time by a factor of ten. Note that, the large separation between times for (de)polarization,

**Fig. 6.3** Characteristic time scales in a typical 25 GeV electron storage ring

radiation damping and orbital oscillation modes help to simplify calculations by the use of average methods. The separations between the oscillation-mode time scales, the interval between quanta emitted by a single electron and the duration of the quantum-emission permit the latter to be considered as an abrupt random process with no correction between successive photons.

# **6.6 Kinetic Polarization**

In addition to the spin flip, Eq. (6.9) also describes the polarizing effect involving photon emission without the spin flip. This process combines two aspects, the dependence of synchrotron radiation intensity on the spin state and the energy dependence of the invariance spin field **n**. The principle can be explained using a simple model as shown in Fig. 6.4. We assume **S**<sup>1</sup> and **S**<sup>2</sup> initially have equal projections on **n**0. After the photon emission, the precession axis abruptly changes by *δ***n**. The projection of spin vector **S**<sup>1</sup> on **n** is thereby increased, while the projection of spin vector **S**<sup>2</sup> is reduced evidently. If the probability of the photon emission, for the case of no spin flip, were the same for both two spin vectors, the net effect would be zero on average. However, The photon emission probability is higher for an electron with state **S**<sup>1</sup> than **S**2, since **S**<sup>1</sup> has a larger projection on the magnetic field direction **b** than **S**2. Averaging over all spin states, it results in an increase in the polarization along **n**.

The polarizing contribution *δP*<sup>3</sup> arising from *<sup>∂</sup>***<sup>n</sup>** *∂δ* can be introduced to Eqs. (6.27) and (6.35). The general equation for the asymptotic polarization is obtained by the Derbenev-Kondratenko formula: [8]

$$P\_3(\infty) = -\frac{B}{A} = -\frac{8}{5\sqrt{3}} \frac{\oint ds \left\langle \frac{\mathbf{b} \cdot (\mathbf{n} - \frac{\partial \mathbf{n}}{\partial \det \mathbf{b}})}{|\rho(s)|^3} \right\rangle\_s}{\oint ds \left\langle \frac{1 - \frac{2}{9} (\mathbf{n} \cdot \mathbf{s})^2 + \frac{11}{18} |\frac{\partial \mathbf{n}}{\partial \phi}|^2}{|\rho(s)|^3} \right\rangle\_s}. \tag{6.40}$$

**Fig. 6.4** Kinetic polarization arising from the change of precession axis due to the photon emission

Comments on the kinetic polarization are given as follows.


# **6.7 Resonances**

Analogous to the orbital motion, the behavior of the spin precession axis in the presence of an arbitrary perturbation can be expressed in terms of components with frequencies *νi* from the Fourier transform. This representation can be applied to the spin-orbit coupling function **d** by interpreting the perturbation as arising from the emission of a phonton. We start with the effective perturbation **n** of the precession axis immediately after the photon emission, i.e.,

$$\Delta \mathbf{n} = \sum\_{j} \frac{\epsilon\_{j} e^{-i\nu\_{j}\theta\_{0}}}{\nu\_{spin} - \nu\_{j}} \mathbf{f}\_{+} + h.c. \tag{6.41}$$

where *j* is the magnitude of the perturbation, **<sup>f</sup>**<sup>+</sup> is the unit complex vector perpendicular to the third axis, and h.c. represents hermitian conjugate. Let us define *j* <sup>=</sup> *cj <sup>δ</sup>*, then the spin-orbit coupling function becomes

$$\mathbf{d} = \sum\_{j} \frac{c\_{j}e^{-i\nu\_{j}\theta\_{0}}}{\nu\_{spin} - \nu\_{j}} \mathbf{f}\_{+} + h.c.\tag{6.42}$$

In a case where the perturbations arise from the closed orbit errors, with the harmonics of amplitude *zk*. Since the orbit harmonics are integer, we put *νj* <sup>=</sup> *<sup>k</sup>*

### 6 Electron Polarization 169

and Eq. (6.41) becomes

$$
\Delta \mathbf{n} = \sum\_{k} \frac{\epsilon\_k e^{-ik\theta\_0}}{\nu\_{spin} - k} \mathbf{f}\_+ + h.c.,\tag{6.43}
$$

and Eq. (6.42) becomes

$$\mathbf{d} = \frac{\partial \mathbf{n}}{\partial \delta} = \sum\_{k} \frac{e^{-ik\theta\_0}}{\nu\_{spin} - k} \{ \frac{\partial c\_k}{\partial \delta} - \frac{c\_k}{\nu\_{spin} - k} \frac{\partial \nu\_{spin}}{\partial \delta} \} + h.c. \tag{6.44}$$

The strength *ck* of an integer spin resonance driven by an orbit harmonic of amplitude *zk* is approximately given as

$$c\_k = \frac{\upsilon\_{spin} k^2 z\_k}{R},\tag{6.45}$$

where *R* is the accelerator radius and *zk* is related to the harmonic*Bk* of the magnetic field error, and *νspin* <sup>=</sup> *γ a*. In a real machine with errors, the variation of *ck* with energy comes from both *νspin* <sup>=</sup> *γ a* of the spin tune and *<sup>z</sup>* from the vertical dispersion *Dy* . Therefore,

$$\frac{\partial c\_k}{\partial \delta} = \frac{\nu\_{spin} k^2}{R} (z\_k + D\_k),\tag{6.46}$$

where *Dk* <sup>=</sup> *∂zk ∂δ* is the *k*th harmonic of vertical dispersion, and *γ ∂νspin ∂δ* <sup>=</sup> *νspin*. Then, Eq. (6.44) becomes

$$\begin{split} \mathbf{d} &= \sum\_{k} \frac{e^{-ik\theta\_{0}}}{\upsilon\_{spln} - k} \{ c\_{k} [1 - \frac{\upsilon\_{spln}}{\upsilon\_{spln} - k}] + \upsilon\_{spln} k^{2} \frac{D\_{k}}{R} \} \mathbf{f}\_{+} + h.c. \\ &= \sum\_{k} \frac{\upsilon\_{spln} k^{2}}{R} e^{-ik\theta\_{0}} \{ \frac{D\_{k}}{\upsilon\_{spln} - k} - \frac{kz\_{k}}{(\upsilon\_{spln} - k)^{2}} \} \mathbf{f}\_{+} + h.c. \end{split} \tag{6.47}$$

The strongest contribution to **d** obviously comes from the harmonic *k* close to the spin tune *νspin*. Also, because of the different powers of the resonant dominator in Eq. (6.47), the influence of the dispersion harmonic *Dk* extends further than that of the orbit harmonics *zk*. If we assume *νspin* to be mid-way between two integers, i.e. *νspin* <sup>−</sup> *<sup>k</sup>* <sup>=</sup> <sup>1</sup> <sup>2</sup> and the relative importance of dispersion and orbit errors can be assessed by comparing *Dk* with 2*kzk*. For example [7], in LEP at 50 GeV, *<sup>k</sup>* <sup>≈</sup> *νspin* <sup>≈</sup> <sup>100</sup> and *zk* (before the orbit correction) might be typically around <sup>5</sup> <sup>×</sup> <sup>10</sup>−<sup>2</sup> mm, then <sup>2</sup>*kzk* <sup>≈</sup> <sup>10</sup> mm. The rough estimates suggest that *Dk* should be approximately 5 mm, then the two terms are likely to be of similar orders of magnitude. With *<sup>R</sup>* <sup>≈</sup> <sup>4</sup>×103m, one obtains|**d**| ≈ <sup>7</sup> in the worse case, which would give a large degree of depolarization. There is an obvious need for compensating the critical harmonics of both orbit and dispersion errors.

# **6.8 Synchrotron Sideband Resonances**

The energy variation arising from synchrotron oscillations modulates the spin tune, leading to synchrotron sideband resonances in the vicinity of some orbit spin resonances. The synchrotron sideband resonances are more troublesome for highenergy electron storage rings than for proton rings. There are two main reasons:


Figure 6.5 shows an example of measurements of the equilibrium polarization of the positron beam in the storage ring SPEAR, where *Pmax* <sup>=</sup> <sup>92</sup>*.*4%. Around the parent resonance *<sup>ν</sup>* <sup>−</sup> *νx* <sup>=</sup> 3, there are four synchrotron sideband resonances:

**Fig. 6.5** Polarization measurements at SPEAR [9, 10]. The curve is a guide for the eye, not a theoretical calculation. The spin tune is *ν*, and the orbital tunes are *νx,y,s*

*<sup>ν</sup>* <sup>−</sup> *νx* <sup>+</sup> *νs* <sup>=</sup> 3, *<sup>ν</sup>* <sup>−</sup> *νx* <sup>−</sup> *νs* <sup>=</sup> 3, *<sup>ν</sup>* <sup>−</sup> *νx* <sup>+</sup> <sup>2</sup>*νs* <sup>=</sup> 3, *<sup>ν</sup>* <sup>−</sup> *νx* <sup>−</sup> <sup>2</sup>*νs* <sup>=</sup> 3. These synchrotron sideband resonances narrow down the available working points in the machine operation and may be a troublesome to achieve a high polarization practically.

# **6.9 Maximization of the Polarization**

# *6.9.1 Minimization of the Depolarization*

The general mechanisms to increase the electron polarization are similar to the ones applied to increase the proton polarization, such as [3]


**Fig. 6.6** Dependence of the polarization on the machine alignment in LEP [11]. As it is shown that the correction of the orbit with respect to the quadrupoles is the key to compensate the spin rotation and improve the polarization

significantly. This consequently reduced the excitation of the synchrotron spin resonances.

3. carefully choosing machine parameters. The natural polarization level can be maximized through a careful choice of beam tunes to avoid all or major strong systematic resonances.

# *6.9.2 Minimization of the Tilt of the* **n** *-Axis*

In the high energy electron storage rings, the global minimization of depolarization sources is not sufficient to reach a high polarization. A mechanism, called *spin matching* procedure aiming at make the orbital motion transparent to the spin motion, is necessary to improve the asymptotic polarization.

The first step is to minimize the deviation of the invariant spin field **n** from the vertical in the dipoles that is mainly produced by vertical closed orbit distortions. This deviation is large on integer spin tune resonances. The depolarization effect can be associated with the tilt of **n** decreased with the 4*th* power of the distance between the spin tune and the integer. To avoid any significant depolarization, **n** is normally at most a few milli-radians away from the vertical. This method is known as *harmonic synchrobeta spin matching*, which minimizes the strengths of depolarizing resonances by generating horizontal fields that are stationary in a (**l**0*,* **m**0*,* **n**0) frame and adjusting their amplitudes and phases so as to compensate the driving term of each integer resonance. Here (**l**0*,* **m**0*,* **n**0) are right hand orthonormal.

The generated harmonics usually do not affect the closed orbit significantly as they are far from the betatron tunes, and such compensation can be very empirical or computed from the measured orbit. However, it was successfully applied at PETRA, which increased the polarization from 40% to 80%. Generation of horizontal field harmonics could be achieved by a few short vertical closed orbit bumps rather than by an orbit perturbation all around the ring, as shown in Fig. 6.7. Figure 6.8 shows the rapid change of the build-up polarization in the LEP after the harmonic spin matching method was applied.

# *6.9.3 Minimization of the Spin-Orbit Coupling Function*

Harmonic spin matching can improve the electron polarization. However, the depolarization in the electron rings is dominated by the betatron and synchrotron spin resonances and not the integer resonances. At high electron energies, due to the large beam energy spread, the synchrotron spin resonances are overwhelming. The horizontal and vertical betatron resonances are also somewhat excited by the synchrotron-betatron coupling. Spin rotators that are introduced for spin manipulations may also significantly enhance the resonances related with horizontal betatron and synchrotron motions. The major transverse depolarization resonances

**Fig. 6.7** In HERA, LEP and Tristan, a pattern of vertical *π*-bumps in the arcs is used to generate sine and cosine magnetic field harmonics to compensate the near-by integer spin resonances

**Fig. 6.8** Improvement of the polarization build-up in LEP following a calculated harmonic correction of the vertical orbit [12]

are directly dependent on the tilt of the **n** axis. When the orbit is well corrected and controlled, the synchrotron spin resonances become dominant. It becomes more incentive to compensate more exactly the spin-coupling integrals at high energies. This method is known as *strong synchrobeta spin matching* that will be discussed in detail in the chapter of Spin Matching.

# **6.10 Polarized Electron Beams in Rings**

Collisions of highly polarized electrons and protons at high energies enable a comprehensive study to understand the structure of the proton and neutron directly from the dynamics of their quarks and gluons. The electron serves as a probe to bear the unmatched precision of the electromagnetic interaction, while the proton determine the correlations of quark and gluon distributions. High values of polarization significantly reduce the uncertainties in determination of these correlations and provide the possibility of finding new physics with experimental evidences for the parity violation and weak interaction. Two accelerator facilities are utilized here to present the generation, manipulation and preservation of a polarized electron beam in a collider.

# *6.10.1 Polarized Electrons in HERA (1992–2007)*

HERA, as shown in Fig. 6.9, was a 6.3 km long electron(positron)/proton collider located at Deutsches Elektronen Synchrotron, DESY, in Hamburg, Germany. The machine was routinely operated with collision energies of 27.5 GeV for electrons (positrons) and 920 GeV for protons at a center of mass energy of 318 GeV [13]. It was the only lepton-proton collider in the world while operating, and still the only one while this book is edited. Although the HERA experiments ended in 2007, the data analysis continues to study the proton inner structure and point the way for future particle physics experiments. The following is the major history of electron/positron polarization at HERA [14].


**Fig. 6.9** The HERA complex

### 6 Electron Polarization 175


Figure 6.10 shows the invariant spin field **n**<sup>0</sup> on the closed orbit at HERA. As discussed in the early sections of this chapter, **n**<sup>0</sup> is designed to be vertical in arcs to provide an optimum asymptotic polarization and minimize the depolarization. The longitudinal polarization at the collision point is obtained by the spin rotators installed in the up- and downstream of the collision point. Figure 6.11 shows the electron orbital and spin motions in the HERA spin rotator. Such spin rotator is composed of interleaved horizontal and vertical dipole magnets, with a configuration of antisymmetric vertical magnetic field and symmetric radial field. With proper magnet placements and beam energy, the designed orbit is intact outside of the rotator. Spin matching was carried out in HERA successfully and it improved the polarization, as discussed in early sections. Figure 6.12 shows the electron polarization as a function of time at 26.7 GeV in HERA. The fifth power of the polarization build-up versus energy is observed when the beam energy is raised in the storage ring.

**Fig. 6.10** The invariant spin field **n**<sup>0</sup> on the closed orbit in HERA

HERA MiniRotator: Buon + Steffen

27 – 39 GeV, both helicities at the IP, variable geometry

**Fig. 6.12** The electron polarization as a function of the time in the HERA [3]

# *6.10.2 Polarized Electrons in EIC*

The Electron Ion Collider (EIC) [15] will be a 3.8 km long particle accelerator, shown in Fig. 6.13, built at the Brookhaven National Laboratory (BNL) in the United States of America. With the collisions of electrons and various ion species, the EIC will enable the physicists to understand the nature of matter at its most fundamental level, providing the clearest picture of how the elemental quarks and gluons interact

### 6 Electron Polarization 177

**Fig. 6.13** EIC layout [15]. The ion and electron collider rings and electron injector, i.e. Rapid Cycling Synchrotron (RCS), share the same present RHIC tunnel. EIC can accommodate two collision points for experiments

to form the basic structure of atoms and nuclei. EIC has the following unique features:


Both polarized electron and light ion beams are desired in the EIC. In particular, the electron polarization requirements are:


It is extremely challenging to reach all design goals. The experience on providing a highly polarized electron beam in the HERA is valuable, however, brainstorming on designing, preserving and manipulating the electron polarization are highly desired in order to meet all the stringent requirements in the EIC. In a summary, the strategies on the design of electron polarization in the EIC Electron Storage Ring (ESR) are:


Figure 6.14 shows the Sokolov-Ternov times in the ESR at several EIC interested electron beam energies. Note that, it is not practical to build up the electron polarization in the EIC ESR due to its long Sokolov-Ternov time, up to more than 10 hours, in this relatively low electron beam energy range.

Figure 6.15 shows the electron spin rotator design in the EIC ESR. It is composed of interleaved solenoid and dipole fields. Such a spin rotator can rotate the electron spin from vertical to longitudinal, and vice versa, in the whole beam energy region from 5 to 18 GeV. Besides, the designed orbit is also constant in the whole energy region.

Figures 6.16 and 6.17 show the asymptotic polarizations of the electron beam in the 10 and 18 GeV areas in the perfectly aligned EIC ESR, respectively. Note that *Pbks* <sup>≈</sup> 83%, less than <sup>92</sup>*.*4%, is due to the *(***n**<sup>0</sup> · **<sup>s</sup>***)*<sup>2</sup> term in Eq. (6.27) in the spin rotator regions. The spin matching is performed at 18 GeV electron beam energy to minimize the depolarization resulting in the asymptotic polarization of 68%, while the longitudinal spin matching can not be carried out perfectly at 10 GeV resulting in the asymptotic polarization of 50%. However, the depolarization in the 10 GeV area is ≈ 16 times slower than that in the 18 GeV area. With the proposed regular replacement of the electron beam, a high average polarization can be achieved in the whole interested electron energy region in the EIC.

**Fig. 6.14** Sokolov-Ternov time as a function of electron beam energy in the EIC ESR. The time has a strong dependence on the dipole bending radius (|*ρ*<sup>|</sup> 3) and beam energy ( <sup>1</sup> *<sup>γ</sup>* <sup>5</sup> ). The change of the slope in the low energies is due to the enhanced radiation by splitting the dipole structure at energies below 10 GeV. Overall, building up the electron polarization in the EIC ESR is not practical, especially in the low energies. EIC adopts a design of a full-energy injection of polarized electron bunches into the ESR with the desired spin direction from the polarized electron source

**Fig. 6.15** Electron spin rotator in the EIC ESR to rotate the spin between the vertical and longitudinal directions. Spin rotation angles *ϕ*1*,*<sup>2</sup> from the solenoids are determined by the spin rotation angles *ψ*1*,*<sup>2</sup> from the dipole magnets. Note that dipole bending angles *θ*1*,*<sup>2</sup> are fixed in the whole energy range, while *ψ*1*,*<sup>2</sup> are scaled with the electron beam energy

**Fig. 6.16** Asymptotic polarization for the 10 GeV polarized electron beams in the perfectly aligned EIC ESR

Figure 6.18 shows that the asymptotic polarization decreases from 68% in the perfectly aligned machine shown in Fig. 6.17 down to 40% when quadrupole misalignments and orbital coupling introduced and corrected. Spin tracking simulations show many high-order spin resonances when the spin resonance condition meets.

**Fig. 6.17** Asymptotic polarization for the 18 GeV polarized electron beams in the perfectly aligned EIC ESR

**Fig. 6.18** Asymptotic polarization from spin tracking simulations in the18 GeV area in the EIC ESR with misalignments and roll errors included and corrected [15]

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 7 Spin Matching**

183

**Vadim Ptitsyn**

**Abstract** When spin rotating devices are used in an electron accelerator ring the stochastic depolarization caused by synchrotron radiation becomes an issue. Special design of the ring optics is required in order to minimize harmful effect of stochastic depolarization. Ring optics adjustments which help to minimize the depolarization are called spin matching. In this lecture the formalism for deriving spin matching conditions is presented. Then, spin matching conditions are derived for examples of a spin rotator based on solenoidal magnets and a spin rotator based on vertical and horizontal bending magnets.

# **7.1 Introduction**

Consider designing two spin rotators, one for a proton ring, another for an electron ring. Let's assume that the energies of proton and electron rings are similar, say 5 GeV. At this energy we decide to use a spin rotator design based on interleaved solenoidal and bending magnets since it does not create excessive beam orbit excursions. During the design work in both electron and proton cases we have found spin rotation angles of all rotator magnets required to transform the vertical polarization at the rotator entrance into the longitudinal one at the rotator exit point.

V. Ptitsyn (-)

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Electron-Ion Collider, Brookhaven National Laboratory, Upton, NY, USA e-mail: vadimp@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_7

Therefore requirements on the field strengths of the solenoidal and dipole magnets become known. At this point the design for proton rotator is well defined. But the electron rotator requires some more work: the spin matching is needed to minimize the effect of stochastic depolarization (spin diffusion).

# **7.2 Electron Polarization Parameters**

Synchrotron radiation determines the polarization evolution through Sokolov-Ternov spin-flip emission and spin diffusion caused by quantum emission of SR photons. Both processes combined define the equilibrium polarization *Peq* and polarization relaxation time *τ* , according to

$$P(t) = (P\_0 - P\_{eq}) \text{ e}^{-t/\tau} + P\_{eq} \tag{7.1}$$

where *P*<sup>0</sup> is the initial polarization (at *t* = 0). Consideration of polarizing and depolarizing effects caused by synchrotron radiation was done in [1] where following expressions for *Peq* and *τ* were obtained:

$$P\_{eq} = -\frac{8}{5\sqrt{3}} \frac{\alpha\_-}{\alpha\_+} \tag{7.2}$$

$$
\pi^{-1} = \frac{5\sqrt{3}}{8} \frac{\hbar}{m} \frac{r\_0}{\eta} \gamma^5 \alpha\_+ \tag{7.3}
$$

where

$$\alpha\_{-}=\langle\frac{\ddot{\mathbf{b}}}{\rho^{3}}(\hat{\mathbf{n}}-\mathbf{d})\rangle\tag{7.4}$$

$$\alpha\_{+} = \left\langle \frac{1}{\rho^3} \left[ 1 - \frac{2}{9} (\hat{\mathbf{n}} \hat{\mathbf{v}})^2 + \frac{11}{18} |\mathbf{d}|^2 \right] \right\rangle \tag{7.5}$$

and following notation is used:


Averaging in formulas (7.4), (7.5) is done over accelerator ring circumference and over the orbital motion phase space. But away from spin resonances one can use **n**ˆ **<sup>0</sup>** instead of **n**ˆ and skip averaging over the phase space to get sufficiently accurate evaluation of the polarization characteristics. Minus sign in formula (7.2) shows that the build-up of the electron polarization over time happens in the direction opposite to the magnetic field.

Depolarization caused by spin diffusion is defined by a derivative of invariant spin field over *δ* = *E/E*:

$$\mathbf{d} = \left(\frac{\partial \hat{\mathbf{n}}}{\partial \delta}\right)\_{\mathbf{x}, \mathbf{x}', \mathbf{y}, \mathbf{y}'} \tag{7.6}$$

This derivative must be taken at constant values of *x,x ,y,y* , and in terms of complex betatron amplitudes can be rewritten as:

$$\mathbf{d} = \left(\frac{\partial \hat{\mathbf{n}}}{\partial \delta}\right)\_{A\_{\mathbf{x}}, A\_{\mathbf{y}}} + \left(\frac{\partial \hat{\mathbf{n}}}{\partial A\_{\mathbf{x}}}\right)\_{\delta, A\_{\mathbf{y}}} \cdot \left(\frac{\partial A\_{\mathbf{x}}}{\partial \delta}\right) + \left(\frac{\partial \hat{\mathbf{n}}}{\partial A\_{\mathbf{y}}}\right)\_{\delta, A\_{\mathbf{x}}} \cdot \left(\frac{\partial A\_{\mathbf{y}}}{\partial \delta}\right) + c.c.\tag{7.7}$$

First term in the equation above come from direct electron energy change when the photon is emitted, which happens in all bends. Second term contribute in the horizontal bends where there is non-zero horizontal dispersion. And third term is due to radiation in places with non-zero vertical dispersion that can appear due to errors or betatron coupling or in spin rotators with vertical bends.

In order to minimize depolarization one needs to minimize the amplitude of the vector **d** in elements where the synchrotron radiation happens, that is in bending magnets. Let's consider an ideal circular accelerator (Fig. 7.1). Such ideal accelerator ring does not contain any spin rotators or snakes, thus, there is no horizontal dipole or longitudinal fields on the design beam orbit. Also there is no betatron coupling and no misalignment and magnet errors. The spin invariant field **n**ˆ in this ideal accelerator ring is only coupled with the vertical betatron motion of particle. Indeed, the stable spin direction **n**ˆ remains vertical for any particles having *Ay* = 0 even if they have some energy offset or performing horizontal betatron oscillations. Thus, *∂***n**ˆ *∂δ* <sup>=</sup> <sup>0</sup> and *<sup>∂</sup>***<sup>n</sup>** *∂Ax* = 0 on the beam orbit. The vertical betatron oscillations lead to the deviation of **n**ˆ from vertical due to horizontal field of the quadrupole magnets experienced by particles with non-zero *Ay*. Thus the derivative of the invariant field over the vertical betatron amplitude *Ay*, *<sup>∂</sup>***n**<sup>ˆ</sup> *∂Ay* ,

**Fig. 7.1** The ideal accelerators has stable spin

is non-zero. But, since the ideal ring has no betatron coupling and no vertical dispersion, the *∂Ay ∂δ* is equal to 0 everywhere, including bending magnets. Which means that the vertical betatron motion is not affected by the synchrotron radiation in this case. Since all terms contributing to the vector **d** in formula (7.7) are equal to zero, the vector **d** is also zero all around ring in the ideal accelerator ring.

As soon as one adds a spin rotator or a Snake into the accelerator ring the vector **d** is excited. Then a question arises on how to design the ring optics to minimize the vector **d** and, hence, minimize the stochastic depolarization. We will go through a technique of deriving the spin matching conditions on the optics in next sections.

Magnet misalignments and rolls can also excite **d** and enhance the stochastic depolarization. For the errors we can not really design spin matching, unless these errors are very localized. The standard way would be to establish tolerances on misalignments and rolls during accelerator design stage in order to achieve acceptable depolarization level. This studies are done by using spin simulation codes.

# **7.3 Spin Matching Formalism**

For calculation in this lecture the transverse orbital motion will be described by using its presentation through components of betatron motion eigen-vectors *fI* ,*fI I* and horizontal and vertical dispersion functions *Dx* , *Dy* :

$$\mathbf{x} = f\_{Ix}\mathbf{A}\_{\mathbf{x}} + f\_{Ix}^{\*}\mathbf{A}\_{\mathbf{x}}^{\*} + f\_{IIx}\mathbf{A}\_{\mathbf{y}} + f\_{IIx}^{\*}\mathbf{A}\_{\mathbf{y}}^{\*} + D\_{\mathbf{x}}\delta$$

$$\mathbf{y} = f\_{Iy}\mathbf{A}\_{\mathbf{x}} + f\_{Iy}^{\*}\mathbf{A}\_{\mathbf{x}}^{\*} + f\_{IIy}\mathbf{A}\_{\mathbf{y}} + f\_{IIy}^{\*}\mathbf{A}\_{\mathbf{y}}^{\*} + D\_{\mathbf{y}}\delta\tag{7.8}$$

where *Ax* and *Ay* are complex amplitudes of horizontal and vertical betatron motion, *δ* = *dp/p* presents a particle momentum offset.

Without betatron coupling the transverse motion expressions are simplified to:

$$\mathbf{x} = f\_{I\mathbf{x}} A\_{\mathbf{x}} + f\_{I\mathbf{x}}^{\*} A\_{\mathbf{x}}^{\*} + D\_{\mathbf{x}} \delta$$

$$\mathbf{y} = f\_{II\mathbf{y}} A\_{\mathbf{y}} + f\_{II\mathbf{y}}^{\*} A\_{\mathbf{y}}^{\*} + D\_{\mathbf{y}} \delta \tag{7.9}$$

where

$$f\_{I\chi} = f\_{\chi} = \sqrt{\beta\_{\chi}} e^{i\Psi\_{\chi}} \tag{7.10}$$

$$f\_{II\circ} = f\_{\circ} = \sqrt{\beta\_{\circ}} e^{i\Psi\_{\circ}} \tag{7.11}$$

$$
\Psi\_{\mathbf{x},\mathbf{y}} = \int\_0^s \frac{1}{\beta\_{\mathbf{x},\mathbf{y}}} ds \tag{7.12}
$$

### 7 Spin Matching 187

Let's consider an accelerator ring which can include, besides the vertical guiding fields of horizontal bending magnets, also solenoidal and vertical field in locations where spin rotating devices are used. The spin motion on the design beam orbit can be resolved and the periodical spin solution **n**ˆ **<sup>0</sup>** can be found all along the ring circumference. One can also define two spin solutions on the design orbit orthogonal to the vector **n**ˆ **<sup>0</sup>** and to each other, the vectors ˆ**l0** and **m**ˆ **<sup>0</sup>**. The vector set *(*ˆ**l0***,* **m**ˆ **<sup>0</sup>***,* **n**ˆ **<sup>0</sup>***)* form right-handed orthonormal triad, which is convenient for considering spin motion perturbations. To simplify mathematical description one can combine vectorsˆ**l0** and **m**ˆ **<sup>0</sup>** into the complex vector **k**ˆ **<sup>0</sup>** = ˆ**l0**−*i***m**ˆ **<sup>0</sup>**. Together with **n**ˆ **<sup>0</sup>**, the vectors **k**ˆ **<sup>0</sup>** and **k**ˆ <sup>∗</sup> **<sup>0</sup>** are the eigenvectors of the one-turn spin transformation. One turn transformation of **k**ˆ **<sup>0</sup>** at any accelerator azimuth *s* is written as:

$$
\hat{\mathbf{k}}\_{\mathbf{0}}(\mathbf{s} + \mathbf{C}) = \mathbf{e}^{i2\pi\nu\_{\mathbf{0}\mathbf{p}}} \hat{\mathbf{k}}\_{\mathbf{0}}(\mathbf{s}) \tag{7.13}
$$

Arbitrary spin can be presented by a complex variable *α*:

$$\mathbf{S} = \sqrt{1 - |\alpha|^2} \hat{\mathbf{n}}\_{\mathbf{0}} + \text{Re}(i\alpha \hat{\mathbf{k}}\_{\mathbf{0}}^{\*}) \tag{7.14}$$

Far from spin resonances the spin deviation from the **n**ˆ<sup>0</sup> due to momentum deviation or betatron motion is expected to be small, therefore |*α*| 1. In the first order the spin deviation *α* is described by the following equation:

$$\frac{d\alpha}{ds} = -i\mathbf{w} \cdot \hat{\mathbf{k}}\_{\mathbf{0}}.\tag{7.15}$$

The components of perturbation spin precession vector **w** can be derived from the BMT equation:

$$\begin{aligned} w\_{\chi} &= (1+\upsilon\_0)\mathbf{y}^{\prime\prime} + (\upsilon\_0 + \frac{a}{\mathsf{y}})K\_{\chi}\delta + (1+a)K\_{s}\mathbf{x}^{\prime} \\ w\_{\delta} &= (1+a)(K\_{\chi}^{\prime}\mathbf{x} + K\_{\mathbf{y}}^{\prime}\mathbf{y} - K\_{s}\delta) - (\upsilon\_0 - a)(K\_{\chi}\mathbf{x}^{\prime} + K\_{\mathbf{y}}\mathbf{y}^{\prime}) \\ w\_{\chi} &= -(1+\upsilon\_0)\mathbf{x}^{\prime\prime} + (\upsilon\_0 + \frac{a}{\mathsf{y}})K\_{\chi}\delta + (1+a)K\_{s}\mathbf{y}^{\prime} \end{aligned} \tag{7.16}$$

where the magnet anomaly *a* = 0*.*00116 for electrons, *ν*<sup>0</sup> = *γ a* and the fields of bending and solenoidal magnets are presented by the normalized fields *Kx,y,s* = *Bx,s,y/(Bρ)*.

One can find a solution *αinv* of the Eq. (7.15) which is periodical not only with ring azimuth, but also with betatron motion phases. This solution corresponds to the invariant spin field **n**ˆ, and thus defines also the derivatives o f the invariant spin field over *δ*, *Ax* and *Ay* which is of interest when calculating the vector **d** (7.7).

Now let's consider an accelerator ring with spin rotators (Fig. 7.2). Usually, two spin rotators are installed around the collision point in order transform the polarization direction from vertical to longitudinal, and then back to vertical. We

**Fig. 7.2** The ring with spin rotator insertion has the stable spin direction non-vertical inside the insertion

**Fig. 7.3** The EIC spin rotator utilizes a sequence of solenoidal magnets and horizontal bends in order to create longitudinal stable spin direction in the experimental detector

call the spin rotator system to be spin matched if the spin invariant field (*αinv*) dependence on horizontal betatron amplitude *Ax* and energy deviation *δ* is cancelled outside the rotator system. The following integral over the whole spin rotator system must be made 0 (or at least minimized) for terms proportional to *Ax* and *δ*:

$$\int\_{s\_{\rm li}}^{s\_{\rm out}} \[w\_{\rm x}\hat{k}\_{0\chi} + w\_{\rm s}\hat{k}\_{0s} + w\_{\rm y}\hat{k}\_{\rm oy}\} ds \tag{7.17}$$

We will demonstrate how the spin matching conditions are derived using two examples of spin rotators systems:


# **7.4 Spin Matching for Solenoidal Spin Rotators**

The EIC spin rotator [2] includes solenoidal magnets (spin rotation angle *ϕj* ) and horizontal bends (spin rotation angle *ψj* ), as shown in Fig. 7.3.

### 7 Spin Matching 189

From spin matrix analysis of this rotator system one can derive conditions for achieving the longitudinal polarization at the experimental point:

$$\tan \varphi\_{\parallel} = \pm \frac{\cos \psi\_2}{\sqrt{-\cos(\psi\_1 + \psi\_2)\cos(\psi\_1 - \psi\_2)}} \tag{7.18}$$

$$\cos\varphi\_2 = \cot\psi\_1 \cot\psi\_2\tag{7.19}$$

From here the required solenoidal fields on all energy range can be found.

For spin-matching of this rotator system the spin-orbital integral (Eq.(7.17)) needs to be evaluated and made equal 0 if possible. For evaluating this integral one can assume following reasonable optics conditions which are accommodated by the rotator optics design:


When evaluating the integral the integration by parts can be used to get a simpler form of spin matching condition:

$$\mathbf{y''}k\_{0\mathbf{x}} = (\mathbf{y'}\hat{k}\_{0\mathbf{x}})' - \mathbf{y'}\hat{k}\_{0\mathbf{x}}'$$

$$\mathbf{x''}k\_{0\mathbf{y}} = (\mathbf{x'}\hat{k}\_{0\mathbf{y}})' - \mathbf{x'}\hat{k}\_{0\mathbf{y}}' \tag{7.20}$$

Applying this one can find that the spin-orbit integral needs to be taken only over bending and solenoidal magnets:

$$\begin{split} \int\_{s\_b}^{s\_\theta} \{- (1+\nu\_0) \mathbf{y}'(K\_s \hat{k}\_{0\mathbf{y}} - \nu\_0 K\_\mathbf{y} \hat{k}\_{0\mathbf{x}}) + K\_s x' \hat{k}\_{0\mathbf{x}} + (K\_\mathbf{y}' \mathbf{y} - K\_s \delta - \nu\_0 K\_\mathbf{y} \mathbf{y}') \hat{k}\_{0\mathbf{s}} - \hat{k}\_{0\mathbf{s}} \} \\ - (1+\nu\_0) x' K\_s \hat{k}\_{0\mathbf{x}} + (\nu\_0 K\_\mathbf{y} \delta + K\_s \mathbf{y}') \hat{k}\_{0\mathbf{y}}) ds = \\ \int\_{sol} \{- \nu\_0 K\_s (x' \hat{k}\_{0\mathbf{x}} + y' \hat{k}\_{0\mathbf{y}}) - K\_s \delta \hat{k}\_{0\mathbf{s}} \} ds + \\ + \int\_{bends} \{\nu\_0^2 K\_\mathbf{y} \mathbf{y}' \hat{k}\_{0\mathbf{s}} + K\_\mathbf{y}' y \hat{k}\_{0\mathbf{s}} + \nu\_0 K\_\mathbf{y} \delta \hat{k}\_{0\mathbf{y}} \} ds = 0 \end{split} (7.21)$$

Thus the integration has two terms. One includes integration over solenoids and another over horizontal bending magnets.

Selecting terms proportional to *Ax*, *A*<sup>∗</sup> *<sup>x</sup>* and *δ* one comes to the following form of the spin matching conditions. The solenoids are assumed divided in two halves with compensation quadrupoles between:

$$\sum\_{l=1}^{4} H(f\_l)\_l = 0\tag{7.22}$$

where *H (fI )i* is:

$$H(f\_I) = \frac{\phi\_l}{2} \mathbb{I} \left( (f\_{Ix}' + \frac{K\_l}{2} f\_{Iy}) \hat{k}\_{0x} + (f\_{Iy}' - \frac{K\_l}{2} f\_{Ix}) \hat{k}\_{0y} \right)\_{entr} + $$

$$\left( (f\_{Ix}' + \frac{K\_l}{2} f\_{Iy}) \hat{k}\_{0x} + (f\_{Iy}' - \frac{K\_l}{2} f\_{Ix}) \hat{k}\_{0y} \right)\_{exlt} \tag{7.23}$$

where the entrance and the exit denote points just before the first solenoid of the solenoidal insertion and right after the second solenoid.

A condition for the terms proportional to *A*∗ *<sup>I</sup>* is derived the same way to get:

$$\sum\_{l=1}^{4} H(f\_I^\*)\_l = 0\tag{7.24}$$

Next the terms in the integral proportional to *δ* should be considered. The integration in solenoid of the term with *(D <sup>x</sup> k*ˆ0*<sup>x</sup>* + *D <sup>y</sup> k*ˆ0*y)* is done the same way as for horizontal betatron motion. Other terms are trivially integrated. As result one gets the following spin-matching condition related electron energy deviation:

$$-\nu\_0 \sum\_{l=1}^{4} H(\mathcal{D})\_l - \sum\_{l=1}^{4} (\phi\_l(\hat{k}\_{0s})\_l) + \sum\_{j=1}^{4} (\psi\_j(\hat{k}\_{0\circ})\_j) = 0\tag{7.25}$$

Note that each of three conditions is complex. Thus, in fact there are total of six conditions that needs to be satisfied by proper rotator layout and optics.

Spin matching conditions related with betatron motion can be satisfied for each individual solenoidal insertion, using two solenoid halves and (at least) 6 quadrupoles between them (Fig. 7.4). In this case one can find a solution which nullifies *H (fI )i* and *H (f* <sup>∗</sup> *<sup>I</sup> )i* for each individual solenoid insertion. This solution can be presented in optics matrix form: The configuration of solenoidal and bending magnets in the EIC spin rotator has been chosen to satisfy the spin-matching

**Fig. 7.4** The EIC rotator solenoidal insertion uses quadrupoles between two solenoid halves to compensate for the betatron coupling and satisfy the spin matching condition

condition for off-momentum motion at 18 GeV energy. For operation at lower energies it is not fully satisfied.

$$T\_{\chi} = \begin{pmatrix} -\cos\phi & -\frac{2}{K\_s}\sin\phi\\ \frac{K\_s}{2}\sin\phi & -\cos\phi \end{pmatrix}; \quad T\_{\chi} = -T\_{\chi} \tag{7.26}$$

where

$$K\_s = \frac{B\_s}{B\rho}; \quad \phi = (1+a)K\_s\tag{7.27}$$

Figures 7.5 and 7.6 demonstrate how the absolute value of the vector **d** looks like without and with spin matching. In first case, shown in Fig. 7.5, large oscillation

**Fig. 7.6** The vector **d** along the EIC electron storage ring azimuth after the spin matching done

of d-function propagates all over the ring circumference. After spin matching realized (Fig. 7.6) the vector **d** is only present in the area between rotators. Thus, no stochastic depolarization comes from the machine arcs. The depolarization is limited only to the area between rotators where non-zero **d** vector still exists. Spin matched optics considerably reduces depolarization, making the spin resonances narrower. An example demonstrating improvement from spin matching for the EIC is shown in Fig. 7.7.

# **7.5 Spin Matching for Dipole Rotators**

Let's now consider the Steffen-Buon rotator based on dipole magnets [3] described in the lecture on spin rotators and shown in Fig. 7.8. A variant of this rotator scheme was used the electron ring of electron-proton collider HERA .

According to our recipe for calculations of spin matching conditions one needs to know the spin eigenvectors. For instance in the interval between rotators the eigenvectors are found to be:

$$
\hat{\mathbf{n}}\_{\mathbf{0}} = (-\sin(\gamma a K\_{\mathbf{y}}), \cos(\gamma a K\_{\mathbf{y}}), 0);
$$

$$
\hat{\mathbf{k}}\_{\mathbf{0}} = (\cos(\gamma a K\_{\mathbf{y}}), \sin(\gamma a K\_{\mathbf{y}}), i);
\tag{7.28}
$$

where *Ky* <sup>=</sup> <sup>0</sup> *<sup>s</sup> Kyds*.

Using (7.16) the precession vector components can be written as:

$$\begin{aligned} w\_{\mathbf{x}} &= \nu\_0 \mathbf{y}'' + \nu\_0 K\_{\mathbf{x}} \delta \\ w\_{\mathbf{s}} &= \mathbf{0} \\ w\_{\mathbf{y}} &= -\nu\_0 \mathbf{x}'' + \nu\_0 K\_{\mathbf{y}} \delta \end{aligned} \tag{7.29}$$

where only terms dominant at large energy are left for brevity.

Spin matching conditions can be separated into horizontal and vertical betatron contributions, proportional to *Ax* and *Ay* correspondingly, and longitudinal contribution, proportional to *δ*. From term proportional to *Ax* one gets the following condition:

$$\int\_{-s\_{\mathbb{F}}}^{s\_{\mathbb{F}}} \nu\_0 f\_{\boldsymbol{x}}^{\prime\prime} \hat{k}\_{0\boldsymbol{y}} ds = \int\_{-s\_{\mathbb{F}}}^{s\_{\mathbb{F}}} -\nu\_0 g\_{\boldsymbol{x}}(\boldsymbol{s}) \hat{k}\_{0\boldsymbol{y}} \sqrt{\beta\_{\boldsymbol{x}}} \exp(\boldsymbol{i}\,\Psi\_{\boldsymbol{x}}) ds = 0 \tag{7.30}$$

And from term proportional to *A*∗ *x* :

$$\int\_{-s\_{\mathbb{F}}}^{s\_{\mathbb{F}}} \nu\_0 f^{\*\prime\prime} \hat{k}\_{0\mathbb{Y}} ds = \int\_{-s\_{\mathbb{F}}}^{s\_{\mathbb{F}}} -\nu\_0 g\_{\ge}(s) \hat{k}\_{0\mathbb{Y}} \sqrt{\beta\_{\ge}} \exp(-i\Psi\_{\ge}) ds \tag{7.31}$$

Condition derived from term proportional to *δ* is:

$$\int\_{-s\_I}^{s\_I} [\upsilon\_0 (D\_\mathbf{y}'' \hat{k}\_{0\chi} - D\_\mathbf{x}' \hat{k}\_{0\chi}) + \upsilon\_0 (K\_\mathbf{x} \hat{k}\_{0\chi} + K\_\mathbf{y} \hat{k}\_{0\chi})] ds = $$

$$= \int\_{-s\_I}^{s\_I} [\upsilon\_0 (g\_\mathbf{x}(\mathbf{s}) D\_\mathbf{x} \hat{k}\_{0\chi} - g\_\mathbf{y}(\mathbf{s}) D\_\mathbf{y} \hat{k}\_{0\chi}] ds \tag{7.32}$$

At the derivation of the condition above the well-known equation for the orbital motion functions *fx* , *Dx* and *Dy* were used:

$$f\_{\boldsymbol{\chi}, \boldsymbol{y}}'' + g\_{\boldsymbol{\chi}, \boldsymbol{y}}(\boldsymbol{s}) f\_{\boldsymbol{\chi}, \boldsymbol{y}} = 0$$
 
$$D\_{\boldsymbol{\chi}}'' + g\_{\boldsymbol{\chi}}(\boldsymbol{s}) D\_{\boldsymbol{\chi}} = K\_{\boldsymbol{\chi}}.\tag{7.33}$$
 
$$D\_{\boldsymbol{\chi}}'' + g\_{\boldsymbol{\chi}}(\boldsymbol{s}) D\_{\boldsymbol{\chi}} = -K\_{\boldsymbol{\chi}}$$

In spin rotators which include vertical bends the synchrotron radiation happening in the vertical bends couples with vertical betatron amplitude. Thus, in this case an additional spin matching needs to be realized: minimizing the spin-orbital integral terms proportional to *Ay* and *A*<sup>∗</sup> *<sup>y</sup>* . Since any quadrupole in the ring arc contributes to the spin coupling with the vertical orbital motion the integration has to be done over the whole ring circumference. Thus, following integrals have to be minimized to suppress depolarization effect coming from the synchrotron radiation in the rotator:

$$\int\_{-s\_r}^{s\_r} \nu\_0 f\_{\circ}^{\prime\prime} \hat{k}\_{0\times} ds = \int\_{-s\_r}^{s\_r} -\nu\_0 g\_{\circ}(s) \hat{k}\_{0\times} \sqrt{\beta\_{\circ}} \exp(i\Psi\_{\circ}) ds$$

$$\int\_{-s\_r}^{s\_r} \nu\_0 f\_{\circ}^{s\prime\prime} \hat{k}\_{0\times} ds = \int\_{-s\_r}^{s\_r} -\nu\_0 g\_{\circ}(s) \hat{k}\_{0\times} \sqrt{\beta\_{\circ}} \exp(-i\Psi\_{\circ}) ds \tag{7.34}$$

These integrals should be considered for both rotators on left and right sides from the experimental point.

# **7.6 Calculating Vector d in Computer Programs**

A popular algorithm for calculating the vector **d** in a spin program is SLIM. Originated in the first-order SLIM code [4], it presently can be found in several other accelerator codes (for instance, BMAD [5]).

In the SLIM algorithm the 8-D spin-orbital vector consisting of 6 orbit variables *(x, px,y,py , τ, δ)* and 2 spin variables *(α, β)* is used to represent motion of a particle and its spin. The spin-orbital vector transport is described by extending standard 6-D matrices *M*6×<sup>6</sup> for orbital transport to 8-D case:

$$
\tilde{M}(\text{s1}, \text{s2}) = \begin{pmatrix} M\_{6 \times 6} & 0\_{6 \times 2} \\ G\_{2 \times 6} & D\_{2 \times 2} \end{pmatrix} \tag{7.35}
$$

Vector **d** is calculated using components **v** and **w** of one-turn 8-D transformation eigenvectors **qj**:

$$\mathbf{q}\_{\mathbf{j}} = \begin{pmatrix} \mathbf{v}\_{\mathbf{j}} \\ \mathbf{w}\_{\mathbf{j}} \end{pmatrix} \quad j = 1, \ldots, 6$$

$$\mathbf{q}\_{\mathbf{j}} = \begin{pmatrix} \mathbf{0}\_{6} \\ \mathbf{w}\_{\mathbf{j}} \end{pmatrix} \quad j = 7, 8$$

$$\frac{\partial \hat{\mathbf{n}}}{\partial \boldsymbol{\delta}} = i \sum\_{j=1}^{6} \mathbf{v}\_{\mathbf{j}}^{\*} \mathbf{w}\_{\mathbf{j}} \tag{7.36}$$

Another algorithm, ASPIRRIN [6], calculates vector **d** unified in one set with other spin-orbital functions, called response functions, using standard transport matrices of the orbital motion and special vectors for dipole and solenoidal magnets.

Calculations using SLIM and ASPIRRIN is done in first-order of orbital and spin dynamics. On the basis of this first-order vector **d** the equilibrium polarization as well as polarization relaxation time is calculated in both codes.

When designing the spin rotators the first-order calculations are important to realize the spin matching and confirm that it works as intended. But then further spin studies has to be done using a spin tracking code and including different kind of machine errors. These spin tracking studies will reveal also higher-order spin resonances, not seen by the first-order codes, giving more complete evaluation of the equilibrium polarization and the polarization relaxation time.

# **7.7 Summary**

In order to minimize stochastic depolarization spin rotators in electron rings require satisfying special lattice conditions, called spin matching. Main idea of spin matching is to minimize or totally nullify the absolute value of vector **d** = *∂***n**ˆ*/∂δ* in the accelerator arcs where synchrotron radiation happens. Analytically spin matching conditions can be derived using spin-orbit integrals. In spin programs the SLIM algorithm is often used for evaluating the **d**-vector.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 8 Polarization in a GeV RLA**

197

**Yves Roblin**

**Abstract** Polarized beam dynamics in a Recirculated Linear Accelerator (RLA) differ markedly from their behavior in circular machines. After giving a brief overview of the topology of a RLA we discuss the unique requirements for polarized beam physics experiments carried at these types of machines and their implications on the spin transport. The Thomas BMT equation will be rewritten to emphasize the relevant features and the relationship between spin transport and global accelerator parameters such as the accelerating profiles. We will consider scenarios for which one or more experimental hall has to be provided with longitudinal polarization and discuss how this is achieved. Finally, a review of possible depolarization and spin precession effects occurring in these machines will be presented. In order to illustrate this, we will examine the case of the Stanford Linear Collider (SLC) where such effects were first observed.

# **8.1 Topology of a Recirculated Linear Accelerator**

Recirculated super conducting linear accelerators are used when high duty factor continuous beams for nuclear physics experiments are desired. Many such experiments require polarized electron sources yielding up to 90% of longitudinally or transversally polarized beams.

This manuscript has been authored in part by Jefferson Science Associates, LLC under Contract No. DE-AC0506OR23177 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the work for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this work, or allow others to do so, for United States Government purposes.

Y. Roblin (-)

Center for Advanced Studies of Accelerators, Thomas Jefferson National Accelerator Facility, Newport News, VA, USA

e-mail: roblin@jlab.org

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_8

**Fig. 8.1** CEBAF recirculator. The beam is generated in the injector where spin manipulations are performed. It is accelerated through two linacs connected by return arcs. By convention we call the return arcs near the extraction region (left of the figure) the west arcs, whereas the arcs on the opposite side are called east arcs

The beam is generated in the injector, usually with a low emittance, and accelerated in the first linac. It is then transported to the front of the next linac arranged in a 180◦ configuration from the first one. Appropriate transport ensures that it is on crest for acceleration in the next linac. Each linac has independent cavity phasing controls and accelerating gains. The beam transport system is comprised of multi-pass spreaders and recombiners combined with standard transport arcs optimized for low emittance growth.

CEBAF [1] is one such machine where experiments demanding a high degree of polarization are carried out. Figure 8.1 shows the general layout. The beam can be accelerated through the linacs and recirculated up to five times. It can be extracted and sent to experimental halls at any given pass. Recent upgrades to CEBAF added another half pass and Hall D. We will not discuss this in the remainder of this document as this hall does not necessitate the use of polarized beams.

# **8.2 Helicity, Spin and Polarization**

Experiments making use of polarized electron beams are studying physics processes for which the cross-section depends on the helicity of the incoming electron beam. As a reminder, helicity is defined as the projection of the spin component along the momentum. The spin of a particle is a quantum degree of freedom. For a massless photon, it can take two different values which corresponds to +1 and −1 helicities, electrons carry 1/2 and −1/2 helicities. Polarization is the weighted average of the spin states over the particle distribution. This is the quantity that is accessible via polarimetry measurements and is what we will be referring to in the rest of this document.

Polarized electrons are produced by exploiting the conservation of helicity during photo emission. A laser is passed through a linear polarizer to yield linearly polarized photons which are an equal superposition of −1 and +1 helicities. This light is then polarized circularly via a birefringent electro-optic crystal (called Pockels cells) allowing for one helicity state or the other to be dominant (typically >99.9% of circular polarization).

This light when illuminating a strained GaAs cathode will predominantly excite electrons from specific conduction bands with quantum numbers such that the helicity is conserved.

Progress in strained semiconductor superlattice photocathodes has allowed for producing polarized electrons of specific helicities with polarization of about 90% and quantum efficiency greater than 1% capable of readily producing currents of several hundreds of microamperes.

# **8.3 Typical Tolerances on Spin Transport for Parity Experiments**

Experiments probing the conservation of parity are extremely demanding on the beam parameters. They rely upon measuring cross-section differences (asymmetries) for the two incoming electron helicity states. In order to resolve the very small parity-violating physics asymmetries, it is necessary to measure and/or suppress other helicity correlated systematic asymmetries. This includes any helicity correlated position and angle differences, beam intensity and beam envelope at the experimental target. Table 8.1 list typical beam tolerances that were achieved and those that will be required for new experiments.

Note that the units are nanometers and part per billion (ppb). This refers to the time averaged value of the helicity correlated differences over the duration of the experiment. Even though the beam position monitors are only accurate to a few tens of µm, the helicity averaged difference over months of data taking reaches nanometers by virtue of accumulating enough statistics. All these experiments hinge on that critical factor.

They employ a number of methods to eliminate or reduce the systematic errors. Some have a direct bearing on the lattice design of the accelerator, others are implemented via optical manipulations on the laser table. One of the essential method is to regularly reverse the helicity of the electron beam at the experimental target in order to measure both helicity correlated beam asymmetries. This is typically implemented as a fast reversal (of the order of a few tens of Hz to kHz) and a slow reversal (once a day). The Pockels cells provide fast reversal whereas a


**Table8.1**BeamtolerancesforparityviolationexperimentsperformedandproposedatCEBAF

remotely insertable optical half-wave plate (on the laser table) or a Wien filter and/or solenoidal lenses on the electron beam allow for the slow reversal.

Most experiments are only interested in receiving longitudinally polarized electrons. Nevertheless, the spin manipulations should also allow for out of plane polarization since it is sometimes requested to measure transverse spin physics asymmetries, which are of interest themselves, or must be quantified as a background to the longitudinal physics asymmetry.

Recalling the topology of a typical RLA machine such as the CEBAF accelerator, one sees that the majority of the lattice dipoles are bending in the horizontal direction.

If one neglects the synchrotron radiation effects, the spreader and recombiner sections both account for zero net vertical bending and hence do not induce any precession of the vertical spin component. Orienting the spin vertically at the start of the machine would render the transport transparent to the spin. However it is challenging to then rotate it into a longitudinal orientation at the physics target in the experimental halls at high energy. For this reason, it is injected horizontally at the start of the machine accounting for the precession across the entire lattice.

# **8.4 Spin Propagation in an Ideal RLA with No Synchrotron Radiation**

The spin precession along an accelerator lattice is described by the Thomas BMT equation, which reads:

$$\frac{d\mathbf{S}}{dt} = \frac{q}{m\gamma} \mathbf{S} \times \mathbf{S} \tag{8.1}$$

The angular velocity  at which the spin precesses is governed by the momentum of the beam and the magnetic and electric fields it encounters. Ignoring the transverse electric fields which are only present in the early injector in the Wien filters, we have:

$$\mathbf{\mathfrak{A}} = (1 + a\boldsymbol{\chi})\mathbf{B}\_{\perp} + (1 + a)\mathbf{B}\_{\parallel} \tag{8.2}$$

This equation can be modified for the case of a RLA machine to emphasize the relevant features.

Firstly, since we are sending electrons for which the spin is oriented longitudinally, we only consider transverse magnetic field. We will treat the longitudinal magnetic fields as perturbations.

Longitudinal fields such as those arising in solenoids are only present in the injector and part of the Wien filter system. The rest of the injector solenoids are designed to be counter wound (two alternating reversed loops) to still provide focusing but result in a net zero spin precession.

Each recirculating arc bends for a total of 180◦. A single arc will induce a precession of *φ* = *πaγ* . During each circulation, the beam will encounter arcs on the west and east side and accumulate more precession.

We thus write the angular rotation that the longitudinal spin component undergoes as it traverses the entire machine as [2]

$$\begin{aligned} \phi\_n &= \frac{a}{m\_e} [(n\theta\_1 + (n-1)\theta\_2)E\_0 \\ &+ \frac{n}{2}((n+1)\theta\_1 + (n-1)\theta\_2)E\_1 + \frac{n(n-1)}{2}(\theta\_1 + \theta\_2)E\_2 \\ &+ (E\_0 + n(E\_1 + E\_2)\theta\_h) \end{aligned} \tag{8.3}$$

where n denotes the pass at which we extract the beam, *θ*1, *θ*<sup>2</sup> and *θh* are the total bend angles on the west and east recirculation arcs and hall arc, *E*0,*E*<sup>1</sup> and *E*<sup>2</sup> are the energy gains of the injector, north and south linacs respectively. For an ideal machine, the bending angles are exactly defined.

In the rest of this chapter, unless otherwise specified, we will use the Zgoubi [3] notation for spin components where Sx is the longitudinal, Sy is the transverse and Sz the vertical component.

Parameterization of spin rotation with pass number is the object of Exercise 1, Sect. 8.7.

# *8.4.1 Single Hall Case*

With only one experimental hall requiring polarization, one would adjust the Wien filter to yield an integer number of *π* precession from the injector to the physics target. This is verified by measuring the longitudinal polarization in the halls with polarimeters (Compton, Møller). Corrections are made as necessary until the measured longitudinal polarization in the hall is maximized. Shown in Figs. 8.2 and 8.3 is the longitudinal spin component tracked through the CEBAF lattice (using Zgoubi) from the injector to the experimental halls at first pass prior and after Wien filter adjustments respectively. This was calculated for an injector gain of *Einj* = 78*.*79 MeV and linac gains of *E*<sup>1</sup> = *E*<sup>2</sup> = 700 MeV.

# *8.4.2 Using the Wien Filter to Orient the Spin*

A Wien filter is a device with static and electric magnetic fields orthogonal to each other and arranged in such a way as to provide a net spin rotation without deflecting the beam. Wien filters have astigmatism since they focus the beam in the plane of the electric field. That is usually compensated via external quadrupoles or a tilted pole design.

**Fig. 8.2** Prior to adjusting Wien filter, note the injected spin is longitudinal when the Wien filter is turned off

**Fig. 8.3** After adjusting Wien filter for Hall A, note the final longitudinal polarization in Hall A is Sx = 1

A span of <sup>±</sup>*<sup>π</sup>* <sup>2</sup> for the spin rotation is easily achieved for incoming electron beam kinetic energies of around 130 KeV (CEBAF).

The Wien filter condition can only be achieved for a monochromatic and pointlike beam. Real beams have energy spread and transverse sizes, both of which will produce transverse focusing in the plane of the electric field and energy spread

**Fig. 8.4** CEBAF double Wien filter setup. The first Wien filter (vertical) downstream of the photoguns rotates the polarization from longitudinal to vertical. The second Wien filter (horizontal) rotates the polarization in-plane to compensate precession of CEBAF transport magnets. Solenoids in-between ensure additional polarization rotation requirements

variations in the longitudinal plane. Proper re-matching of the transverse beam envelope is necessary in order to minimize emittance growth during subsequent acceleration.

# *8.4.3 Spin Flipping to Reduce Uncertainties*

Many of the systematic errors caused by beam induced helicity asymmetries can be canceled by polarization reversal. As mentioned earlier, this can be done on the laser table during the generation of the circular light or by slow reversal on the electron beam.

This slow reversal is accomplished by means of a 4*π* spin rotator, namely a set of two Wien filters associated with a pair of solenoids [4]. The electron beam generated at the gun is longitudinally polarized. The first Wien filter is powered to produce an out of plane vertical polarization. A pair of solenoids provide a rotation of the spin back in the horizontal plane along the beam direction or 180◦ from it providing a mean to produce a slow helicity flip. A second Wien filter is used to generate the horizontal rotation needed for compensating for the precession around the machine. Figure 8.4 shows a schematic of the system employed at CEBAF.

# **8.5 Spin Propagation to Multiple Experimental Halls**

# *8.5.1 Concept of Magic Energies*

In order to be able to maximize the longitudinal polarization in more than one hall, one has to constrain the choice of energy gains in the linacs to certain values. Writing Eq. 8.3 for two different experimental halls, we want to find the energy gains for which the difference *h*<sup>1</sup> *<sup>n</sup>* <sup>−</sup> *h*<sup>2</sup> *<sup>m</sup>* between hall h1 and hall h2 extracted at passes n and m is an integer multiple of *π*.

**Fig. 8.5** Magic energies for longitudinal spin in two halls. Green lines depict the final energy in Hall D. Purple lines are the energy combinations between Hall A and Hall B yielding an integer number of *π* precession

This results in a set of available energies (so-called magic energies) as shown in Fig. 8.5. Note that this figure was produced by also imposing the constraints that the two halls have to be at different passes unless both are at pass 5 (because of the particular topology and design of the extraction system for CEBAF).

The difference in spin precession between two experimental halls is the object of Exercise 2, Sect. 8.7.

# *8.5.2 Optimizing for Multiple Halls, Figure of Merit*

Looking at Eq. (8.3), one can see that it is possible to use the linac gains as a spin rotation knob. If one configures the RLA with asymmetric acceleration for a given total accelerating gain *E* (*E*<sup>1</sup> + *E*<sup>2</sup> = *E*, *E*<sup>1</sup> = *E*2) then one can generate a differential spin precession between the east and west side of the machine. This method provides for an additional reach of possible configurations.

During the preparation of experimental schedules, a figure of merit taken as the square of the polarization in each hall is maximized to allow for the optimal running. Note that we assume that the halls are not current limited (the actual statistical figure of merit includes multiplying by the beam current). Typically, one hall is chosen to receive maximum polarization and energies are selected to maximize


the polarization in other halls while fulfilling other experimental requirements. The calculations are arranged in a matrix (called the *P*<sup>2</sup> matrix) with the columns being the passes and the rows the experimental halls.

Under most circumstances, one cannot maximize the polarization in all three halls, so this figure of merit matrix allows for comparison between different scenarios. For example, the Wien filter angle necessary for maximizing the polarization in one hall can be selected and the effect on the other halls and passes is shown in the *P*<sup>2</sup> matrix. Various algorithms are employed to arrive at a configuration that is satisfactory for the multiple hall running and the programmatic choices made.

At this stage of planning, a simple analytical model making use of the formulas developed above and taking into account the synchrotron radiation loss in the arcs is utilized. The final determination is obtained by tracking through the lattice to map out the beam energy along the line and the resulting spin precession.

Shown in Tables 8.2 and 8.3 are the *P*<sup>2</sup> matrices for the planning that took part in 2019. This corresponded to *Einj* = 121*.*5 MeV, *E*<sup>1</sup> = *E*<sup>2</sup> = 1031 MeV. As seen in these tables, maximizing the spin for Hall A at first pass also provided for a good figure of merit for B and C at pass 5 (close to 1).

Spin precession along CEBAF and *P*<sup>2</sup> matrix are the object of Exercise 3, Sect. 8.7.

# **8.6 Depolarization and Spin Precession Effects**

# *8.6.1 Orbit Errors due to Lattice Imperfections*

Lattice imperfections lead to imperfection resonances and affect the performance of a ring negatively. This is not the case for a RLA. One only goes through each arc once so there is no closed orbit to be perturbed by quadrupole kicks which would generate spin-orbit resonance coupling.

Consequently, misalignment errors will simply lead to extraneous dipole kicks which will affect the spin precession but not depolarize the beam.

### 8 Polarization in a GeV RLA 207

What about intrinsic resonances arising from the interaction between the spin tune *aγ* and the vertical betatron oscillations in the periodic arc structures?

In theory this could produce a decoherence of the spin if one ends up on a resonance condition. The strength of such spin resonances is proportional to the Fourier spectrum of the perturbing field accumulated when the beam oscillates through the vertical plane of the quadrupoles times *aγ* .

Recalling the definition of polarization, one sees that depolarization can occur when particles in the beam see a different perturbing field at different phase advances leading to spin states no longer oriented in a prevailing direction. This would occur since a vertical betatron oscillation within the bunch will produce kicks that will add up coherently if on resonance with the spin tune gradually resulting in the spin of these particles spiraling away from the initial polarization direction.

The vertical betatron oscillation within the bunch is proportional to the conserved quantity which is the square root of the emittance. Fortunately, RLA machines such as CEBAF have exceedingly small emittances. At 12 GeV, the vertical emittance in CEBAF is about 1 nm.rad (geometric) for the last pass and considerably smaller on lower passes. Consequently, most RLA machines do not have to worry about spin resonances due to the beam envelope extent.

A related situation is when one has an orbit oscillation (instead of just the beam envelope) in a periodic structure. It turns out that in some cases, this can be a significant effect which will induce extraneous precession. There is no depolarization since it does not affect the spin distribution of individual particles in the bunch but instead alters the spin precession of the entire bunch.

It was observed first at the Stanford Linear Accelerator Center (SLAC) during the commissioning of the detectors for the Stanford Linear Collider (SLC).

This machine was designed to collide polarized electrons and unpolarized positrons in order to produce polarized *Z*<sup>0</sup> bosons. Figure 8.6 shows its layout. After being produced, beams are stored in damping rings where their emittance is reduced. They are then accelerated in a linac to around 50 GeV and brought into collision at the interaction point (IP) by means of collider arcs.

The polarization needs to be longitudinal at the IP, so super-conducting solenoids located in the electron damping ring and in front of the linac allow for rotating the spin in order to accommodate the total precession. Polarimeters are located at the IP and can be used to measure the longitudinal spin component.

During commissioning, it was observed that the longitudinal polarization was very sensitive to the vertical orbit fluctuations in the arc. It had not been anticipated and prompted a number of theoretical and experimental studies which led to the realization that this was due to running near an intrinsic spin resonance resulting in extra precession.

As it turns out the collision arc is a periodic structure for which the vertical betatron tune happens to be coinciding with the spin tune when running at or near the *Z*<sup>0</sup> boson center of mass energy (about 45.6 GeV for each beam). We will explore this in an exercise dedicated to modeling the SLC arc.

In particular, we will calculate the buildup of the vertical spin through one achromat of the north arc when near the spin resonance condition. Figures 8.7

**Fig. 8.7** Original SLAC result from [6]. In their notation, Sz is the longitudinal spin, *Sy* is the vertical spin

**Fig. 8.8** Spin along the orbit, a calculation using Zgoubi. Sx is the longitudinal spin, Sz is the vertical spin. Also depicted is the vertical orbit deflection referenced on the right vertical axis

and 8.8 show the vertical and longitudinal spin components propagating through one achromat when the vertical orbit oscillation is 0.5 mm. Figure 8.8 was obtained using Zgoubi and closely track the SLAC results in their original publications [6, 7] which was calculated at the time using spinor methods.

# *8.6.2 Bump Orbit Spin Rotator*

In order to increase the luminosity at the IP, the SLD collaboration at SLAC decided to start using flat beams [5–7]. Up until then, spin precession in the collider arcs was corrected by means of the spin rotator in the damping rings and at the entrance of the linac. Optical matching of this device becomes complicated when using flat beams and would have required installing supplemental skew quadrupoles and develop a new tuning protocol. Instead, an alternative method was employed exploiting the spin orbit resonance condition.

Recall that in order to rotate the spin one needs only a combination of longitudinal and transverse fields like solenoids and dipoles. If one has a resonant condition as described above, a vertical orbit deflection will cause the spin vector to rotate in the vertical plane around an axis perpendicular to the longitudinal direction as seen in Fig. 8.8. Hence, using two orbit bumps separated by dipole magnets will act as a spin rotator. SLAC used this to very reliably adjust the spin precession for SLC even though they could not measure the orbit bumps or the orbit fluctuations with the required accuracy. Instead, they empirically mapped out the orbit bumps generated by shifting combined function dipoles from the reference orbit with the measured longitudinal polarization at the IP [6].

Figure 8.9 shows an orbit bump closed after the first seven achromats and its effect on the vertical and longitudinal spin when near resonance (45.64 GeV, left) or away from resonance, Fig. 8.10.

**Fig. 8.9** 42*π* orbit bump at 45.64 GeV

**Fig. 8.10** 42*π* orbit bump at 40 GeV

# *8.6.3 Effect of Energy Spread and Other Off-Momentum Errors*

There are several types of energy effects to consider. The first being that particles inside the bunch will be off-momentum due to the energy spread relative to the reference momentum. For such particles, the spin is rotated by an angle *δθ* relative to the on-momentum particle. This results in a smearing of the longitudinal polarization but no net depolarization loss provided that the beam energy is not near a spin resonance.

Figure 8.11 shows the effect of the energy spread on the longitudinal polarization distribution at CEBAF for two values of the intrinsic energy spread.

Another possibility is the beam itself being off-momentum because of synchrotron radiation and a particular choice of the magnet powering scheme.

It is effectively the case in CEBAF where the dipoles making up the arcs are powered in series by one power supply per arc which is usually set to the onmomentum value corresponding to the energy of the beam in the middle of the arc after it has been degraded by synchrotron radiation.

Hence, the first half of the dipoles is under powered while the second half is overpowered. The orbit error is compensated for by corrector magnets.

We estimate this effect by tracking through the lattice and mapping out the energy profile to use when calculating the precession. When folded in with other errors due to the calibration of the linac cavities, we typically predict the proper Wien filter

**Fig. 8.11** Effect of intrinsic energy spread on longitudinal spin

setting to within a couple of degrees. The final setting is achieved by performing a polarization measurement in the halls and adjusting accordingly.

# **8.7 Homework**

# • **? Exercise 1: Parameterization of Spin Rotation**

Express the spin precession along the vertical axis in terms of the accelerating gradients in the injector, north and south linacs.

Show that it can be parameterized relative to the pass at which the beam is extracted into an experimental hall by recovering formula 8.3.

What assumptions have to be made to write the precession in this form?

### **Solution**

Recall that the Thomas BMT equation which governs the evolution of the spin through the machine can be written as

$$\frac{d\mathbf{S}}{dt} = \frac{q}{m\_0 \chi} \mathbf{S} \times \mathbf{S} \tag{8.4}$$

$$\mathbf{Q} = (1 + a\boldsymbol{\gamma})\mathbf{B}\_{\perp} + (1 + a)\mathbf{B}\_{\parallel} \tag{8.5}$$

Starting from the expression for  in lab coordinates, we ignore the electric field (no source in CEBAF besides the Wien filters which we will treat separately). The other assumption we are going to make is to neglect the **B** component. Since we are considering transport past the injector, there is no solenoid in the rest of the machine. Other source besides solenoids would be the fringe fields at the end of the dipoles and it is a negligible effect.

Integrating Eq. 8.5 over the beam path, we end up with the spin rotation in the particle reference frame on the left side and - *B*⊥*ds* on the right side which, when combined with the *<sup>a</sup> mγ* factor gives - *B*⊥*ds p/e* = *θ* the rotation in the dipoles. So, *θ*1,*θ*<sup>2</sup> and *θh* for the east and west recirculating arcs and the final bend into the hall.

Finally, generalizing the formula to more than one pass and parameterizing in terms of the pass n yields formula 8.3.

It can be proven by inference by realizing that for pass n, we go n times through the east side arc (*θ*1), n-1 times through the west side (*θ*2) and once through the bend towards the hall (*θh*).

# • **? Exercise 2: Difference in Precession Between Two Experimental Halls**

Show that the difference in precession between two experimental halls can be written as *h*<sup>1</sup> *<sup>n</sup>*<sup>1</sup> <sup>−</sup> *h*<sup>2</sup> *<sup>n</sup>*<sup>2</sup> <sup>=</sup> *<sup>a</sup> me f (h*1*, n*1; *h*2*, n*2*)π* where *h*1, *h*<sup>2</sup> are the halls A, B or C and *n*1, *n*<sup>2</sup> are the passes at which the beam is extracted.

Write a program to find the combinations of energies in Hall A and Hall B for which the difference in precession between the two halls is exactly an integer number of *π*. This should allow to reproduce Fig. 8.5.

### **Solution**

Starting from Eq. 8.3, we introduce the ratio *<sup>α</sup>* <sup>=</sup> *<sup>E</sup>*<sup>0</sup> *<sup>E</sup>*<sup>1</sup> of the injector energy to the linac energy and recast it in this form:

$$\Phi\_n^h = E\_1 \left(\frac{g-2}{2m\_\ell}\right) \left[2n^2 - n\left(1 - 2\alpha - \frac{2\theta\_h}{\pi}\right) - \alpha \left(1 - \frac{\theta\_h}{\pi}\right)\right] \tag{8.6}$$

We also assumed that both linacs produce the same acceleration (*E*<sup>1</sup> = *E*2) to simplify the formula.

From there, we can write the difference between halls h1 at pass n1 and h2 at pass n2 and obtain the solution.

When the quantity *E*<sup>1</sup> *g*−2 2*me (h*1*, n*1*, h*2*, n*2*)* is an integer multiple of *π*, both halls have the maximum polarization, this occurs for specific values of *E*1, the socalled magic energies.

One can write a simple python script [8] which generates all these combinations and plot it to reproduce the figure.

# • **? Exercise 3: Spin Precession Along CEBAF;** *P*<sup>2</sup> **Matrix**

Write a program or a simple spreadsheet to calculate the spin precession along the CEBAF machine for various passes and energies.

Using Sand's formula, the loss per arc can be approximated to

$$
\Delta E = 0.08846 E^4 \frac{\pi n\_d}{2l\_d}.
$$

with *nd* the number of dipoles in an arc and *ld* the length of the trajectory in a dipole. Calculate the *P*<sup>2</sup> matrix and Wien filter settings required for each hall. For scheduling purposes, it is acceptable if the *P*<sup>2</sup> in a given hall is above 0.8. Besides Hall B, which other combinations of halls and passes are acceptable when we are maximizing the polarization for Hall B at pass 5?

### **Solution**

The spreadsheet, spinprecessionCEBAFRLA [9], implements the calculation as described above. The gains for the North and South linacs are entered in E2 and F2. The injector gain is automatically calculated in D2. Precession is calculated around the machine using the simplified expression of the Thomas BMT equation 8.3 and the resulting *P*<sup>2</sup> matrix available in cells C23 thru G28. The table labeled *wien required* give the necessary Wien angle to maximize the longitudinal polarization for a particular pass and hall. Finally, the cell C7 provides a mean to turn on (1) or off (0) the synchrotron radiation.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 9 Spin Codes**

**Vahid Ranjbar**

**Abstract** This chapter reviews the approaches to numerically integrate the spinorbit and how they are applied in several spin codes.

# **9.1 Overview of Codes**

Along with theoretical developments and polarized beam studies at the weak focusing synchrotron ZGS (polarized proton beams were produced from 1973) and at the strong focusing synchrotron Saturne 2 (proton and light ion beams, from 1981), a number of spin tracking techniques have been devised over the years along with the design and operation of polarized beam facilities.

Early computer codes were based on matrix transport techniques, two early instances were lattice design and spin dynamics studies for polarized ion beams at Saturne 2 and its synchrotron injector Mimas [1], for electron beams accounting for synchrotron radiation at SPEAR [2]. Numerical integration of the equations of motion was later resorted to and allowed solving spin motion in arbitrary fields, and to high order in particle coordinates, so allowing accurate treatment of spin motion in special devices such as snakes and in field maps [3, 4]. With the increased interest in polarized beams and the design and construction of accelerator facilities, a number of analytical methods have been developed and used in spin codes.

V. Ranjbar (-)

https://doi.org/10.1007/978-3-031-16715-7\_9

217

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Electron-Ion Collider, Brookhaven National Laboratory, Upton, NY, USA e-mail: vranjbar@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection,

Indications regarding possible spin dynamics capabilities of existing beam optics codes may be found in accelerator codes repositories [5, 6].

There are several direct spin-orbit tracking codes freely obtainable at the time of this writing. These can be categorized based on their method of numerical integration, order of accuracy, and also their inclusion of radiative effects necessary when considering electron spin tracking.


Then there are several reduced spin tracking codes which integrate a reduced form the T-BMT equation. These include the codes **SLIM** [2, 17] and **T-BMT** [18].

In addition to direct spin-orbit tracking codes there are codes which calculate the spin resonances for a given energy range based on the optics for an accelerator lattice. These include **DEPOL** [19], **ASPIRRIN** [20] and **SPRINT** [21].

To illustrate the general approaches for numerical integration, we explore the three codes **Zgoubi**, **SPINK** and **GPUSPINTRACK** in more detail in the following sections. **DEPOL** and **T-BMT** are also addressed in dedicated sections.

# **9.2 Integration of the Spin and Orbit**

As we learned in previous chapters the dynamics of the spin vector of a charged particle in the laboratory frame is described by the T-BMT equation,

$$\frac{d\mathbf{S}}{dt} = \frac{q}{\gamma m} \mathbf{S} \times \left( (\mathbf{l} + G\boldsymbol{\gamma}) \mathbf{B}\_{\perp} + (\mathbf{l} + G) \mathbf{B}\_{\parallel} + \left( \frac{\mathbf{l}}{\gamma + 1} + G \right) \boldsymbol{\chi} \frac{\mathbf{E} \times \boldsymbol{\mathcal{J}}}{c} \right) \tag{9.1}$$

**S** is the spin vector in the rest frame of the particle, **E** and **B** are fields in the laboratory, the magnetic field components **B**<sup>⊥</sup> and **B** are defined with respect to the particle's velocity. *<sup>G</sup>* <sup>=</sup> *<sup>g</sup>*−<sup>2</sup> <sup>2</sup> is the anomalous magnetic moment coefficient which for protons is 1.7928474, and *γ mc*<sup>2</sup> is the energy of the particle. We can transform this equation by expanding about a reference orbit described by a Frénet-Serret coordinate system. See Fig. 9.1. Thus we have

$$\frac{d\hat{\mathbf{x}}}{d\mathbf{s}} = \frac{\hat{\mathbf{s}}}{\rho}, \quad \frac{d\hat{\mathbf{s}}}{d\mathbf{s}} = -\frac{\hat{\mathbf{x}}}{\rho}, \quad \text{and} \quad \frac{d\hat{\mathbf{z}}}{d\mathbf{s}} = \mathbf{0},\tag{9.2}$$

Particle motion can be parameterized in this coordinate system as

$$\mathbf{r} = \mathbf{r}\_0(s) + x\hat{\mathbf{x}} + z\hat{z},\tag{9.3}$$

where **r**0*(s)* is the reference orbit, and *s*ˆ = d**r**0*/*d*s*.

The integration of the T-BMT equation requires the knowledge of the spatial dependence of the fields, which in turn depend on the trajectory of the charged particle in the optical elements. A particle traversing a quadrupole magnet off axis will experience a different magnetic field than one going through the center. We calculate this trajectory by integrating the Lorentz force equation.

$$\frac{d\mathbf{p}}{dt} = q \left(\mathbf{E} + \mathbf{v} \times \mathbf{B}\right) \tag{9.4}$$

This is the job which all accelerator codes need to accomplish and to do this they use several standard approaches:


# **9.3 Zgoubi**

Step-wise ray-tracing has accompanied accelerator design concurrently with the emergence of computers and magnetic field simulations in the early 1950s, with Runge-Kutta being one of the early methods [22]. Step-wise integration of the orbital motion allows the necessary accuracy for solving the Thomas-BMT differential equation. This is especially important in small rings where lattice optics field perturbations matter, and in beam transport lines which may include special magnets and fancy spin manipulations; these were the main reasons why step-wise spin tracking were developed in the late 1980s in Zgoubi (originally a spectrometer code) in the context of partial snake plans at Saturne [3], and in Raytrace [23] (a spectrometer code as well) at the AGS for polarized beam transport in AGS and RHIC facility transfer lines [4]. A serendipity of step-wise integration is its yielding 6D motion ab initio as it handles the three components of the position and velocity vectors, independently.

Zgoubi has been in use since the early 2000s at RHIC [24] and its injectors [25, 26], and at present for spin simulations in the EIC electron machines [27, 28]. Preservation of motion invariants, in relation with the truncated Taylor series integration method, is controlled over millions of turns in RHIC size EIC rings, via step size mostly.

In order to integrate the Lorentz equation (*m* is the particle mass, *q* its charge, **v** the velocity, **e** and **b** the local electric and magnetic fields)

$$\frac{\mathbf{d}(\gamma m \mathbf{v})}{\mathbf{d}t} = q \left(\mathbf{e} + \mathbf{v} \times \mathbf{b}\right) \tag{9.5}$$

we rewrite it by nothing that *()* <sup>=</sup> *d() ds* , **<sup>u</sup>** <sup>=</sup> **<sup>v</sup>** *v* , *ds* = *v dt*, *γ m***v** = *γ mv***u** = *q Bρ* **u**, and *Bρ* the rigidity of the particle,

$$(B\rho)'\mathbf{u} + B\rho \,\mathbf{u}' = \frac{\mathbf{e}}{v} + \mathbf{u} \times \mathbf{b},\tag{9.6}$$

**Fig. 9.2** Position and velocity of a particle in **Zgoubi** reference frame

**Zgoubi** uses truncated Taylor developments of the position **R** and normalized velocity **u** vectors, namely,

$$\begin{aligned} \mathbf{R}(M\_1) &\approx \mathbf{R}(M\_0) + \mathbf{u}(M\_0)\,\Delta s + \mathbf{u}'(M\_0)\,\frac{\Delta s^2}{2!} + \dots + \mathbf{u}^{\prime\prime\prime\prime}(M\_0)\,\frac{\Delta s^6}{6!} \\\ \mathbf{u}(M\_1) &\approx \mathbf{u}(M\_0) + \mathbf{u}'(M\_0)\,\Delta s + \mathbf{u}''(M\_0)\,\frac{\Delta s^2}{2!} + \dots + \mathbf{u}^{\prime\prime\prime\prime}(M\_0)\,\frac{\Delta s^5}{5!} \end{aligned} \tag{9.7}$$

In these series **R***(M*0*)* and **u***(M*0*)* are the initial conditions, at point *M*0, **R***(M*1*)* and **u***(M*1*)* are one integration step *s* ahead, at point *M*<sup>1</sup> (Fig. 9.2). The rigidity varies in the presence of electric field, it is calculated the same way using

$$(B\rho)(M\_1) \approx (B\rho)(M\_0) + (B\rho)'(M\_0)\Delta s + \dots + (B\rho)^{\prime\prime\prime\prime}(M\_0)\frac{\Delta s^S}{\mathfrak{H}!} \tag{9.8}$$

The time of flight is expanded in a similar manner

$$T(M\_1) \approx T(M\_0) + T'(M\_0)\,\Delta\mathbf{s} + T''(M\_0)\,\frac{\Delta\mathbf{s}^2}{2} + \dots \\ \quad + T^{\prime\prime\prime\prime}(M\_0)\,\frac{\Delta\mathbf{s}^5}{5!} \qquad (9.9)$$

which simplifies to *T (M*1*)* = *T (M*0*)* + *s/v* in the absence of electric field.

The derivatives **<sup>u</sup>***(n)* <sup>=</sup> *<sup>d</sup>n***<sup>u</sup>** *ds<sup>n</sup>* and *(Bρ)(n)* <sup>=</sup> *<sup>d</sup>n(Bρ) ds<sup>n</sup>* involved in these expressions are calculated by recursive differentiation of Eq. 9.6, details can be found in the Users' Guide [16].

Spin in **Zgoubi** is evaluated in the same manner as the particle, with the three spin vector components treated independently. The T-BMT equation is recast as,

$$\frac{d\mathbf{S}}{dt} = \frac{q}{m\gamma} \mathbf{S} \times \boldsymbol{\omega} \tag{9.10}$$

with, in the laboratory frame,

$$\mathbf{w} = (1+\chi G)\mathbf{b} - G(\chi - 1)\mathbf{b}\_{\parallel} + \chi(G + \frac{1}{1+\chi})\frac{\mathbf{e} \times \mathbf{v}}{c2} \tag{9.11}$$

wherein **b** and **e** are the fields in the laboratory, **b** is the component of **b** parallel to the velocity **v** of the particle. Equation (9.10) is normalized by introducing again *<sup>v</sup>* = ||**v**||, **<sup>v</sup>** <sup>=</sup> *<sup>v</sup>***u**, *ds* <sup>=</sup> *vdt* the differential path, *γ mv <sup>q</sup>* <sup>=</sup> *Bρ* the rigidity of the particle, whereas *<sup>b</sup>* = **<sup>b</sup>** , **<sup>S</sup>** <sup>=</sup> *<sup>d</sup>***<sup>S</sup>** *ds* <sup>=</sup> <sup>1</sup> *v d***S** *dt* is the derivative of the spin with respect to the path. This yields

$$(B\rho)\,\mathbf{S}' = \mathbf{S} \times \boldsymbol{\omega} \quad \text{or} \quad \mathbf{S}' = \mathbf{S} \times \mathbf{\Omega} \tag{9.12}$$

where, noting **B** = **b***/Bρ*, **E** = **e***/Bρ*,

$$\mathbf{A} = \frac{\boldsymbol{\omega}}{B\rho} = (1 + \boldsymbol{\chi}\,G)\mathbf{B} + G(1 - \boldsymbol{\chi})\mathbf{B}\_{\parallel} + \frac{\beta\boldsymbol{\chi}}{c} \left( G + \frac{1}{1 + \boldsymbol{\chi}} \right) \mathbf{E} \times \mathbf{u} \tag{9.13}$$

From the initial conditions *(M*0*)* and **S***(M*0*)* of the particle at position *M*0, the spin **S***(M*1*)* at position *M*1, following a displacement *s* (Fig. 9.2), is obtained from the truncated Taylor expansion

$$\mathbf{S}(M\_{\rm l}) \approx \mathbf{S}(M\_0) + \mathbf{S}'(M\_0)\,\Delta\mathbf{s} + \mathbf{S}''(M\_0)\frac{\Delta\mathbf{s}^2}{2!} + \dots \\ \quad + \mathbf{S}'''''(M\_0)\frac{\Delta\mathbf{s}^5}{5!} \qquad (9.14)$$

The spin vector **<sup>S</sup>** and its derivatives **<sup>S</sup>***(n)* <sup>=</sup> *<sup>d</sup>n***S***/ds<sup>n</sup>* are obtained by recursive differentiation of Eq. 9.12, details in the Users' Guide [16].

# **9.4 SPINK**

SPINK code was developed in the 1990s by Alfredo Luccio and used to extensively model the RHIC machine which was being built at the time. It employed the linear transport matrices from the MAD8 code to track the orbit, estimating the position of the charged particles inside each magnet and thus deducing the field. Beginning from the T-BMT equation:

$$\frac{d\mathbf{S}}{dt} = \frac{e}{\gamma m} \mathbf{S} \times \mathbf{F} \tag{9.15}$$

now with **F** defined as (we now assume no electric field)

$$\mathbf{F} = (1 + G\boldsymbol{\gamma})\mathbf{B}\_{\perp} + (1 + G)\mathbf{B}\_{\parallel} \tag{9.16}$$

and with the perpendicular and parallel components of the magnet field expressed as,

$$\mathbf{B}\_{\perp} = \frac{1}{\upsilon^2} (\mathbf{v} \times \mathbf{B}) \times \mathbf{v}, \quad \mathbf{B}\_{\parallel} = \frac{1}{\upsilon^2} (\mathbf{v} \cdot \mathbf{B}) \mathbf{v}, \tag{9.17}$$

**F** can be expressed as,

$$\mathbf{F} = (1 + G\boldsymbol{\gamma})\mathbf{B} - G(\boldsymbol{\gamma} - \mathbf{l})\frac{1}{\boldsymbol{\upsilon}^2}(\cdot \mathbf{B})\mathbf{v} \tag{9.18}$$

As discussed in previous sections the velocity vector can be expressed in terms of the derivative of the spatial coordinates with respect to the longitudinal coordinate *s* to obtain:

$$\mathbf{v} = \frac{\mathbf{dr}}{\mathbf{d}t} = \left[\mathbf{x}'\hat{\mathbf{x}} + \mathbf{y}'\hat{\mathbf{y}} + (1 + \frac{\mathbf{x}}{\rho}\hat{\mathbf{z}})\frac{\mathbf{ds}}{\mathbf{d}t}\right] \frac{\mathbf{ds}}{\mathbf{d}t} \tag{9.19}$$

One can now rewrite the T-BMT equation as an *s* derivative,

$$\frac{d\mathbf{S}}{ds} = \mathbf{S} \times \mathbf{\hat{a}}\tag{9.20}$$

with,

$$\mathbf{Q} = \frac{h}{B\rho} \left[ (1 + G\boldsymbol{\gamma})\mathbf{B} - G(\boldsymbol{\gamma} - 1)(\mathbf{r}' \cdot \mathbf{B})\mathbf{r}' \right] \tag{9.21}$$

and,

$$\frac{e}{\gamma m} = \frac{v}{B\rho} \tag{9.22}$$

$$h = \sqrt{\mathbf{x}'^2 + \mathbf{y}'^2 + (1 + \mathbf{x}/\rho)^2}$$

$$\mathbf{r}' = \frac{\mathbf{v}}{v} \cdot \mathbf{}$$

Using this the T-BMT equation can be reduced to a third order differential equation,

$$\mathbf{S}^{\prime\prime\prime} + \boldsymbol{\omega}(\mathbf{s})^2 \mathbf{S}^{\prime} = \mathbf{0} \tag{9.23}$$

where,

$$
\omega(\mathbf{s})^2 = \Omega\_\mathbf{x}(\mathbf{s})^2 + (\Omega\_\mathbf{y}(\mathbf{s}) - \frac{1}{\rho(\mathbf{s})})^2 + \Omega\_\mathbf{z}(\mathbf{s})^2 \tag{9.24}
$$

In the case that both the fields and orbits are constant across a given portion of the magnet then *ω(s)* would likewise be constant and solutions in the form of transport matrices can be developed yielding,

$$
\begin{pmatrix}
1 - (B^2 + C^2)c & ABc + Cs & ACc - Bs \\
ABc - Cc & 1 - (A^2 + C^2)c & BCc + As \\
ACc + Bs & BCc - As & 1 - (A^2 + B^2)c
\end{pmatrix}
\tag{9.25}
$$

with

$$c = 1 - \cos\omega \,\text{s} \,\text{s} \,\text{ }, \,\text{s} = \sin\omega \,\text{s} \,\text{s} \tag{9.26}$$

$$A = \frac{\Omega\_\chi}{\omega} \,\text{ }, B = \frac{\Omega\_\chi - 1/\rho}{\omega} \,\text{ }, C = \frac{\Omega\_\chi}{\omega}$$

# *9.4.1 Bends*

Applied to the case of the rectangular bend magnet with *Bx* = *Bz* = 0 and *By* = *Bρ/ρ* one obtains the matrix,

$$
\begin{pmatrix}
\cos \delta \psi & 0 \sin \delta \psi \\
0 & 1 & 0 \\
\end{pmatrix}.
\tag{9.27}
$$

This represents a rotation about the vertical axis through an angle of,

$$
\delta\psi = \omega \delta s = \left[ G\gamma - (\mathbf{l} + G\gamma)\frac{\chi}{\rho} \right] \delta\theta \tag{9.28}
$$

with *δθ* = *δs/ρ* the bend angle.

# *9.4.2 Quadrupoles*

For the quadrupole with a gradient of *k*<sup>1</sup> the fields become *Bx* = *k*1*Bρy*, *By* = *<sup>k</sup>*1*Bρx* and *Bz* <sup>=</sup> <sup>0</sup> with <sup>1</sup> *<sup>ρ</sup>* = 0. In this case the transport matrix becomes,

$$\frac{1}{r^2} \begin{pmatrix} \text{y}^2 + \text{x}^2 \cos \delta \psi \ x \text{y} (1 - \cos \delta \psi) \ -\text{x}r \sin \delta \psi\\ \text{xy} (1 - \cos \delta \psi) \ \text{y}^2 + \text{x}^2 \cos \delta \psi \ \text{y}r \sin \delta \psi\\ \text{x}r \sin \delta \psi \ \text{y} \end{pmatrix} \tag{9.29}$$

with *<sup>ω</sup>* <sup>=</sup> *<sup>k</sup>*1*(*<sup>1</sup> <sup>+</sup> *Gγ )r* and *<sup>r</sup>* <sup>=</sup> *x*<sup>2</sup> + *y*<sup>2</sup>

SPINK made use of the MAD8 generated Twiss functions to calculate the transport matrices and thus coordinates at the beginning and exit of each element. It takes the average of the position between the beginning and end of each sliced transport element to estimate the field that acts on the spin. The accuracy of the solution is controlled by increasing the number of slices in MAD8.

# **9.5 GPUSPINTRACK**

GPUSPINTRACK was developed from a version of SPINK which uses a native teapot integrator called UAL-SPINK. It reads lattices formatted in the SXF style. The development of GPUSPINTRACK was motivated by problems with convergence using the drift and thin kick style teapot orbit integrator. As a result a new orbit integrator was developed which is detailed in [11]. It was observed that when crossing strong spin resonance in the presence of snakes, the highly accurate rendering of the orbital trajectory through the quadrupoles was essential to achieve convergence with a reasonable number of slices.

# *9.5.1 How to Integrate the Quadrupole?*

The Hamiltonian for quadrupole is given by,

$$H\_{\mathcal{Q}} = H\_D(P\_l, P\_\chi, P\_\mathcal{V}) + H\_K(X, Y) \tag{9.30}$$

$$H\_D(P\_l, P) = -\sqrt{1 + \frac{2}{\beta\_0}P\_l + P\_l^2 - P\_\chi^2 - P\_\chi^2} + \frac{1}{\beta\_0}P\_l$$

$$H\_K(X, Y) = \frac{k\_1}{2}\left(X^2 - Y^2\right).$$

Here *Pt* <sup>=</sup> *<sup>γ</sup>* <sup>−</sup>*γ*<sup>0</sup> *<sup>β</sup>*0*γ*<sup>0</sup> with subscript <sup>0</sup> indicating on-momentum values for the relativistic gamma and beta and *k*<sup>1</sup> the quadrupole gradient. The usual teapot approach is to split this Hamiltonian into *HD* for the drift and *HK* for the kick. The effect of each of these pieces can be exactly evaluated yielding a drift transport matrix and a thin kick part. The drifts are then split in half and sandwiched around the thin kick. An improved approach which yields higher accuracy is to split the Hamiltonian in a different way, by adding and subtracting as follows,

$$H\_M = \frac{1}{2} \left( P\_\chi^2 + P\_\chi^2 \right) + \frac{k\_1}{2} \left( X^2 - Y^2 \right) \tag{9.31}$$

$$H\_K = -\sqrt{1 + \frac{2}{\beta\_0} P\_t + P\_t^2 - P\_\chi^2 - P\_\chi^2} + \frac{1}{\beta\_0} P\_t - \frac{1}{2} \left( P\_\chi^2 + P\_\chi^2 \right)$$

Here we add and subtract <sup>1</sup> 2 *P*2 *<sup>x</sup>* <sup>+</sup> *<sup>P</sup>*<sup>2</sup> *y* from each term to create a matrix transport *HM*. GPUSPINTRACK additionally divides the momentum term by the energy contribution to momentum to get the correct tunes for the off energy particles yielding,

$$H\_M = \frac{1}{2} \frac{P\_\chi^2 + P\_\chi^2}{\sqrt{1 + \frac{2}{\beta\_0} P\_l + P\_l^2}} + \frac{k\_1}{2} \left(X^2 - Y^2\right) \tag{9.32}$$

$$H\_K = -\sqrt{1 + \frac{2}{\beta\_0} P\_l + P\_l^2 - P\_\chi^2 - P\_\chi^2} + \frac{1}{\beta\_0} P\_l - \frac{1}{2} \frac{P\_\chi^2 + P\_\chi^2}{\sqrt{1 + \frac{2}{\beta\_0} P\_l + P\_l^2}}$$

# *9.5.2 Spin Precession Calculation*

With the orbit the spin transport can be calculated across a given element slice as was done in the original SPINK code. However GPUSPINTRACK accelerates computation and the spin convergence by making use of Romberg quadrature with quaternions to represent the spin transport using SPINK . The approach is to calculate the quaternions for *q(h)* for different relative step sizes *h* across a given magnetic element as follows,

$$\begin{aligned} R\_{0,2} &= \mathcal{Q}(h) = q(\frac{1}{2}h\mathbf{\mathcal{Q}}\_4)q(h\mathbf{\mathcal{Q}}\_3)q(h\mathbf{\mathcal{Q}}\_2)q(h\mathbf{\mathcal{Q}}\_1)q(\frac{1}{2}\mathbf{\mathcal{Q}}\_0) \\ R\_{0,1} &= \mathcal{Q}(2h) = q(h\mathbf{\mathcal{Q}}\_4)q(2h\mathbf{\mathcal{Q}}\_2)q(h\mathbf{\mathcal{Q}}\_0) \\ R\_{0,0} &= \mathcal{Q}(4h) = q(2h\mathbf{\mathcal{Q}}\_4)q(2h\mathbf{\mathcal{Q}}\_0) .\end{aligned}$$

Here *<sup>i</sup>* represents the calculated spin precession vector at a given slice across the magnetic element (see Fig. 9.3). With this, one can construct a 'bootstrapped'

**Fig. 9.3** Slicing up magnetic element for Romberg integration

quaternion across the whole element to arbitrary order using,

$$R\_{j+1,k} = \frac{4^{j+1}R\_{j,k} - R\_{j,k-1}}{4^{j+1} - 1} \tag{9.34}$$

# **9.6 How to Integrate the T-BMT Equation by Hand**

Aside from numerical integration, it is possible to integrate certain forms of it analytically. Beginning with Eq. 9.20 in the absence of solenoid magnets and vertical bends, the T-BMT equation can, to first order in the coordinates *(x, s, z)*, be rewritten as (see Exercise 1).

$$\begin{aligned} \frac{d\mathbf{S}}{ds} &\approx v \left(\frac{\mathbf{d}t}{\mathbf{ds}}\right) \mathbf{S} \times \mathbf{\mathcal{Q}} \approx \mathbf{S} \times \mathbf{\mathcal{Q}}\\ \boldsymbol{\Omega}\_{\boldsymbol{x}} &= -(1 + G\boldsymbol{\gamma})z''\\ \boldsymbol{\Omega}\_{\boldsymbol{s}} &= (1 + G\boldsymbol{\gamma})z'/\rho - (1 + G) \left(\frac{z}{\rho}\right)'\\ \boldsymbol{\Omega}\_{\boldsymbol{\varepsilon}} &= x''(1 + G\boldsymbol{\gamma}) - \frac{1 + G\boldsymbol{\gamma}}{\rho} \end{aligned}$$

Further, Accounting for the derivatives of the *x, s, z* basis vectors of **S** we can obtain,

$$\begin{aligned} \frac{\mathrm{d}S\_{\mathrm{x}}}{\mathrm{d}s} &= S\_{\mathrm{s}}(\Omega\_{\mathrm{z}} + 1/\rho) - \Omega\_{\mathrm{s}}\mathcal{S}\_{\mathrm{z}}\\ \frac{\mathrm{d}S\_{\mathrm{s}}}{\mathrm{d}s} &= -S\_{\mathrm{x}}(\Omega\_{\mathrm{z}} + 1/\rho) + \Omega\_{\mathrm{x}}\mathcal{S}\_{\mathrm{z}}\\ \frac{\mathrm{d}S\_{\mathrm{z}}}{\mathrm{d}s} &= S\_{\mathrm{x}}\Omega\_{\mathrm{s}} - \Omega\_{\mathrm{x}}\mathcal{S}\_{\mathrm{s}} \end{aligned}$$

If we change to a basis vector which rotates with the beam *(e*ˆ1*, e*ˆ2*, e*ˆ3*)* we obtain,

$$\begin{split} \frac{d\mathbf{S}}{ds} &= \boldsymbol{\omega} \times \mathbf{S}, \\\\ \omega\_{1} &= (\mathbf{I} + G\boldsymbol{\gamma})z'', \\\\ \omega\_{2} &= -(\mathbf{I} + G\boldsymbol{\gamma})z'/\rho + (\mathbf{I} + G)\left(\frac{z}{\rho}\right)', \\\\ \omega\_{3} &= -(\mathbf{I} + G\boldsymbol{\gamma})\mathbf{x}'' + \frac{G\boldsymbol{\gamma}}{\rho}. \end{split} \tag{9.35}$$

This can be further transformed by defining a two-component *spinor* such that the *j* -th component of the spin vector is given by

$$S\_{\slash} = \langle \Psi | \sigma\_{\slash} | \Psi \rangle = \Psi^{\dagger} \sigma\_{\slash} \Psi. \tag{9.36}$$

Here denotes a classical vector with components *u* and *d*, which are related to the three components of **S** by

$$S\_1 = \mathfrak{u}^\* d + \mathfrak{u} d^\*$$

$$S\_2 = -\mathrm{i}(\mathfrak{u}^\* d - \mathfrak{u} d^\*) \tag{9.37}$$

$$S\_3 = |\mathfrak{u}|^2 - |\mathrm{d}|^2.$$

Using *σ* = *(σx , σs, σz)*, the vector of the Pauli spin matrices, and *ζ (s)* = −*ω*1+i*ω*2, it is possible to show (see Exercise 2) that Eq. 9.35 can be transformed into,

$$\frac{d\Psi}{ds} = -\frac{\mathrm{i}}{2}(\sigma \cdot \omega)\Psi = -\frac{\mathrm{i}}{2}H\Psi = -\frac{\mathrm{i}}{2}\begin{pmatrix} \frac{G\gamma}{\rho} & -\zeta(s) \\ -\zeta(s)^{\*} & -\frac{G\gamma}{\rho} \end{pmatrix}\Psi,\tag{9.38}$$

where we have dropped the first term in *ω*3, −*(*1+*Gγ )x*, since it is small compared to *Gγ* .

Using the differential relation d*θ* = d*s/ρ*, one may transform (9.38) so as to make *θ* the independent variable. Then, considering the effects of a *single* resonance, wherein *ζ (θ )* becomes *Ke*−i*Kθ* , the T-BMT equation becomes

$$\frac{d\Psi}{d\theta} = -\frac{\mathrm{i}}{2} \begin{pmatrix} G\gamma & -\epsilon\_K e^{-\mathrm{i}K\theta} \\ -\epsilon\_K^\* e^{\mathrm{i}K\theta} & -G\gamma \end{pmatrix} \Psi. \tag{9.39}$$

If we assume *Gγ* = constant, and transform the spinor equation (9.39) into the *resonance precessing frame* by defining

$$\Psi\_K(\theta) = e^{\frac{i}{2}K\theta\sigma\_\natural} \Psi(\theta). \tag{9.40}$$

one can obtain (see Exercise 3),

$$\frac{\mathrm{d}\Psi\_K}{\mathrm{d}\theta} = \frac{\mathrm{i}}{2} \begin{pmatrix} K - G\gamma & \epsilon\_K \\ \epsilon\_K^\* & G\gamma - K \end{pmatrix} \Psi\_K. \tag{9.41}$$

Since all the elements of the matrix are constant one can simply exponentiate the matrix directly to obtain an exact solution to the differential equation. In the case when *Gγ* is not constant, but linearly accelerating, a solution is still possible and ultimately yields the famous Froissart-Stora formula.

In the case when *Gγ* = *Gγ*<sup>0</sup> + *αθ* we can transform the spinor equation into the spin precessing frame by defining,

$$\Psi(\theta) = e^{-\frac{i}{2}\int\_{\theta}^{\theta} G\boldsymbol{\gamma}(\boldsymbol{\alpha})d\boldsymbol{x}\boldsymbol{\sigma}\_{3}}\Psi\_{I}(\theta) \tag{9.42}$$

### 9 Spin Codes 229

to obtain,

$$\frac{d\Psi\_I}{d\theta} = \frac{\mathrm{i}}{2} \begin{pmatrix} 0 & \epsilon\_K e^{i[(G\gamma\_0 - K)\theta + \frac{1}{2}a\theta^2]} \\ \epsilon\_K^\* e^{-l[(G\gamma\_0 - K)\theta + \frac{1}{2}a\theta^2]} & 0 \end{pmatrix} \Psi\_I. \tag{9.43}$$

which can be transformed into an ordinary second order homogeneous differential equation,

$$\frac{\mathrm{d}^2 \Psi\_I^{\pm}}{\mathrm{d}\theta^2} \mp i\alpha\theta \frac{\mathrm{d}\Psi\_I^{\pm}}{\mathrm{d}\theta} + \frac{|\epsilon\_K|^2}{4} \Psi\_I^{\pm} = 0 \tag{9.44}$$

which has confluent hyper-geometric functions as solutions. Using the asymptotic expressions of these functions it is possible to show that, in the limit of large |*θ*|,

$$S\_{\mathbb{Z}} = 2e^{-\frac{\pi |\epsilon\_K|^2}{2\alpha}} - 1\tag{9.45}$$

which is the famous Froissart-Stora formula.

# **9.7 Calculating Spin Resonances**

One of the first codes to calculate the strength of the intrinsic and imperfection spin resonance strength was developed by Ruth and Courant in 1980 and is known as DEPOL [19]. This code calculates the expansion of *ζ (s)* by making use of the linear transport matrix to derive an exact solution to the elements of the quasi Fourier integral,

$$\epsilon\_K = -\frac{1}{2\pi N\_T} \int\_0^{CNr} \left[ (1 + G\gamma)(z'' + \frac{i z'}{\rho}) - i\rho (1 + G)(\frac{z}{\rho})' \right] e^{iK\theta(s)} ds \tag{9.46}$$

Here *C* is the circumference of the ring. The number of turns *NT* depends on the rationality of *K*. If *K* is an integer then *NT* = 1; however if *K* is an irrational number then we normally would need an infinite number of turns to approximate the resonance strength. Decomposing the integral into a sum of integrals over each element we obtain,

$$\epsilon\_{K} = \sum\_{lattice} \frac{\epsilon\_{K\_{m}}}{N\_{T}} \tag{9.47}$$

$$\epsilon\_{K\_{m}} = -\frac{1}{2\pi} \int\_{s\_{1}}^{s\_{2}} \left[ (1 + G\rho)(z'' + \frac{iz'}{\rho}) - i\rho(1 + G)(\frac{z}{\rho})' \right] e^{iK\theta(s)} ds$$

Assuming that 1*/ρ* is a step function, constant in the element and zero just outside of the element, partial integration leads to an intermediate form,

$$\epsilon\_{K\_m} = \frac{1}{2\pi} \left[ \frac{(1+K)(\chi\_1 + i)}{\rho} z\_1 e^{iK\theta\_1} + \frac{(1+K)(\chi\_2 - i)}{\rho} z\_2 e^{iK\theta\_2} - (9.48) \right]$$

$$(1+K) \int\_{s\_1}^{s\_2} z'' e^{iK\theta} ds - \frac{K}{\rho^2} (K - G) \int\_{s\_1}^{s\_2} z e^{iK\theta} ds \right]$$

Here *χi* is the contribution due to edge focusing of the magnet and *zi* = *z(si)*. Applying partial integration to the last two terms yields,

$$\epsilon \kappa\_n = \frac{1}{2\pi} \left[ \frac{(1+K)(\chi\_1+i)}{\rho} z\_1 e^{iK\theta\_1} + \frac{(1+K)(\chi\_2-i)}{\rho} z\_2 e^{iK\theta\_2} - \right. \tag{9.49}$$

$$-(1+K) \left[ (z\_2'-\frac{iK}{\rho} z z) e^{iK\theta\_2} - (z\_1'-\frac{iK}{\rho} z\_1) e^{iK\theta\_1} \right] + (\frac{K(K^2+G)}{\rho^2}) \int\_{s\_1}^{s\_2} z e^{iK\theta} \, \mathrm{d}s \right]$$

In the uncoupled case the last term can be evaluated exactly using the homogeneous equation *z* = −*Kzz*, where *Kz(s)* is the focusing function of the guide field. Substitution and integration by parts yields,

$$\int\_{s\_1}^{s\_2} z e^{iK\theta} \, \mathrm{d}s = \frac{(z\_2' - \frac{iK}{\rho} z\_2)e^{iK\theta\_2} - (z\_1' - \frac{iK}{\rho} z\_1)e^{iK\theta\_1}}{K\_\varepsilon - K^2/\rho^2}. \tag{9.50}$$

DEPOL uses Courant-Snyder parameters from the MAD output files to construct the *z*1*,*<sup>2</sup> and *z* <sup>1</sup>*,*<sup>2</sup> values. In calculating the resonance integral, one can factor out the phases which change with each period around the lattice. The remaining elements in the sum remain constant for each pass. This permits the evaluation of the integral over just one pass.

Later other more general algorithms have been developed to calculate spin resonances for arbitrary spin orientation [29]. Currently there exists the **SPRINT** [21] code which also can perform these calculations. As well an extension to the **DEPOL** algorithm was developed to handle resonance calculations in the case of linear betatron coupling. More recently the code **ASPIRRIN** [20] was developed to calculate spin resonances in the presence of snakes.

# **9.8 Integration of the Spinor T-BMT Equation for Many Resonances**

In the case that one wants to include the effects of two resonances an analytical approximation has been derived [30], which makes use of the fact that the spinor form of the T-BMT equation can be expressed as a parametric oscillator. However these expressions are long and unwieldy. They do however permit the identification of regions in *θ* where the system can be approximated using only the single dominant resonance outside of the parametric resonance tongues.

In the case that one has more than two resonances, then numerical methods should be used. The T-BMT c++ method performs this integration using a 4th order Magnus Gaussian quadrature. With the spinor T-BMT equation expressed compactly as,

$$\Psi' = \mathbf{A}(\theta)\Psi,\ \Psi(\theta\_0) = \Psi\_0 \tag{9.51}$$

it evaluates *A(θ )* at two orbital locations *<sup>θ</sup>* <sup>+</sup> *(* <sup>1</sup> 2 ± √3 <sup>6</sup> *)h* with step size *h*:

$$A\_1 = A \left[ \theta\_n + \left( \frac{1}{2} - \frac{\sqrt{3}}{6} \right) h \right] \tag{9.52}$$
 
$$A\_2 = A \left[ \theta\_n + \left( \frac{1}{2} + \frac{\sqrt{3}}{6} \right) h \right].$$

These are then used to calculate the used to propagate the spinor:

$$\begin{aligned} \mathfrak{Q}^{[4]}(h) &= \frac{h}{2} (A\_1 + A\_2) - h^2 \frac{\sqrt{3}}{12} [A\_1, A\_2] \\ \Psi\_{n+1} &= e^{\mathfrak{Q}^{[4]}(h)} \Psi\_n \end{aligned} \tag{9.53}$$

Here we use the identity,

$$e^{i\mathbf{a}\cdot\boldsymbol{\sigma}} = \cos|a|I + i\sin|a|\frac{\mathbf{a}\cdot\boldsymbol{\sigma}}{|a|}\tag{9.54}$$

to generate the two-by-two complex matrix to transport the spinors. To reduce the number of integration steps necessary, the T-BMT code transforms first to the interaction frame before performing the 4th order Magnus Gaussian quadrature.

# **9.9 Initialization of Spinors**

For any realistic spin tracking it is necessary to initialize the spinors to the invariant spin field (ISF) before tracking. For most lower energy machines the ISF trivially points vertically along the dominant dipole guide field. In these cases initialization involves setting the spinor to point vertically up or down. However at higher energies or with machines having more complex guide fields the ISF can assume a very complex and spread-out structure as shown in Fig. 9.4. If the spinors are not initially aligned with the ISF then they will execute a precession around the local ISF. This will make it appear that there is a spin resonance or depolarization mechanism when

in fact no polarization would be lost if the spins had be initially aligned with the ISF. Several approaches using stroboscopic averaging were developed by K. Heinemann and G.H.Hoffstatter [21]. T-BMT code and GPUSPINTRACK code employs one of the forward tracking methods detailed in this paper. Here three spin vectors each of which points along the *x*ˆ (= *(*1*,* 0*,* 0*)*), *z*ˆ(= *(*0*,* 1*,* 0*)*), and *s*ˆ (= *(*0*,* 0*,* 1*)*) directions are tracked for each orbital phase space point. These are then tracked through one turn to establish the one turn spin transport matrix (**R**0), the eigenvector of which is calculated to give the spin closed orbit vector *n*ˆ0. This is then dotted into subsequent transport matrices **R***<sup>n</sup>* each turn and accumulated in a total vector **b**,

$$\mathbf{b}\_{n+1} = \mathbf{b}\_n + \mathbf{R}\_n \cdot \hat{n}\_0. \tag{9.55}$$

which is then averaged and normalized to yield the ISF for each phase space point which we want to track. One then needs to select an appropriate number of turns to achieve convergence to the ISF. The number of turns depends on ones proximity to a resonance and the overall nature of the ISF. Evidence that one has not converged can be seen in the turn-by-turn precession of the spin vector for a particle which is not aligned with the ISF.

# **9.10 Homework**

# • **? Exercise 1**

Show that in the absence of solenoid magnets and vertical bends, the T-BMT equation can, to first order in the coordinates *(x, s, z)*, be rewritten as

$$\frac{d\mathbf{S}}{ds} \approx v \left(\frac{d\mathbf{t}}{ds}\right) \mathbf{S} \times \mathbf{\Omega} \approx \mathbf{S} \times \mathbf{\Omega}$$

$$\begin{aligned} \Omega\_{\chi} &= -(1 + G\gamma)z'' \\\\ \Omega\_{s} &= (1 + G\gamma)z'/\rho - (1 + G)\left(\frac{z}{\rho}\right)' \\\\ \Omega\_{\varepsilon} &= x''(1 + G\gamma) - \frac{1 + G\gamma}{\rho} \end{aligned}$$

Here you will use the fact that *Bρ* <sup>=</sup> *γ mv/e* and approximate <sup>d</sup>*<sup>t</sup>* <sup>d</sup>*<sup>s</sup>* ≈ 1*/v* since the other terms will introduce orders of *x, s, z* and 1*/ρ* beyond our approximation. To accomplish this you will also need to first express the perpendicular and parallel magnetic field components in the forms

$$\mathbf{B}\_{\perp} = \frac{1}{\upsilon^2} (\mathbf{v} \times \mathbf{B}) \times \mathbf{v}, \quad \mathbf{B}\_{\parallel} = \frac{1}{\upsilon^2} (\mathbf{v} \cdot \mathbf{B}) \mathbf{v}. \tag{9.56}$$

Then use the Lorentz force equation to express **v** × **B**, hence also **B**<sup>⊥</sup> in terms of d**v***/*d*t*:

$$\frac{d\mathbf{v}}{dt} = \frac{q}{m\gamma} \mathbf{v} \times \mathbf{B},\tag{9.57}$$

$$\mathbf{B}\_{\perp} = \frac{m\boldsymbol{\gamma}}{q\upsilon^{2}} \frac{\mathbf{d}\mathbf{v}}{\mathbf{d}t} \times \mathbf{v}.\tag{9.58}$$

In addition, make use of the fact that

$$\frac{\mathrm{ds}}{\mathrm{dt}} = \frac{v}{\left[\left(1 + \frac{\chi}{\rho}\right)^2 + \chi'^2 + z'^2\right]^{1/2}},\tag{9.59}$$

where *ρ* denotes the radius of curvature of the local Frénet-Serret coordinate system.

### **Solution**

The solution involves using 9.2 together with 9.56 through 9.59 in the T-BMT equation 9.1 to obtain the first-order result 9.56. In the present context, "first-order" means drop all terms of second order and higher in *x*, *z*, 1*/ρ* and their derivatives. Also remember to make use of the initial assumption that solenoids and vertical bends are absent.

You also need to use the fact that the vertical field can be approximated using the strength of the dipole guide field, *Bz* ≈ −[*Bρ*] *<sup>ρ</sup>* . The longitudinal field can be approximated using Ampere's law and assuming that *Bs(z* = 0*)* = 0.

$$\frac{\partial B\_s}{\partial z} = \frac{\partial B\_z}{\partial s} = -B\rho \left(\frac{1}{\rho}\right)'\tag{9.60}$$

Accounting for the derivatives of the *x, s, z* basis vectors of **S** we can obtain,

$$\begin{aligned} \frac{\mathbf{d}S\_{\mathbf{x}}}{\mathbf{d}s} &= S\_{\mathbf{s}}(\boldsymbol{\Omega}\_{\boldsymbol{\varepsilon}} + \mathbf{1}/\rho) - \boldsymbol{\Omega}\_{\boldsymbol{s}}\mathbf{S}\_{\boldsymbol{\varepsilon}}\\ \frac{\mathbf{d}S\_{\mathbf{s}}}{\mathbf{d}s} &= -S\_{\mathbf{x}}(\boldsymbol{\Omega}\_{\boldsymbol{\varepsilon}} + \mathbf{1}/\rho) + \boldsymbol{\Omega}\_{\boldsymbol{\varepsilon}}\mathbf{S}\_{\boldsymbol{\varepsilon}}\\ \frac{\mathbf{d}S\_{\boldsymbol{\varepsilon}}}{\mathbf{d}s} &= S\_{\mathbf{x}}\boldsymbol{\Omega}\_{\boldsymbol{s}} - \boldsymbol{\Omega}\_{\boldsymbol{\varepsilon}}\mathbf{S}\_{\boldsymbol{s}} \end{aligned}$$

If we change to a basis vector which rotates with the beam *(e*ˆ1*, e*ˆ2*, e*ˆ3*)* we obtain,

$$\begin{aligned} \frac{d\mathbf{S}}{ds} &= \mathbf{f} \times \mathbf{S}, \\ f\_1 &= (1 + G\boldsymbol{\gamma})z'', \\ f\_2 &= -(1 + G\boldsymbol{\gamma})z'/\rho + (1 + G)\left(\frac{z}{\rho}\right)', \\ f\_3 &= -(1 + G\boldsymbol{\gamma})x'' + \frac{G\boldsymbol{\gamma}}{\rho}. \end{aligned} \tag{9.61}$$

More formally, we can use the following derivation steps, neglecting solenoid magnets and vertical bends.

$$\mathbf{B}\_{\perp} = \frac{(\mathbf{v} \times \mathbf{B}) \times \mathbf{v}}{v^2} \tag{9.62}$$

Using the Lorentz force equation we can express **v** × **B** as:

$$\frac{d\mathbf{v}}{dt} = \frac{e}{\gamma m} \mathbf{v} \times \mathbf{B} \tag{9.63}$$

$$\mathbf{B}\_{\perp} = \frac{1}{v^2} \frac{m\gamma}{e} \frac{\mathbf{dv}}{\mathbf{d}t} \times \mathbf{v} \tag{9.64}$$

Now expressing **v** and its derivative in terms of its coordinates we get,

$$\frac{\mathrm{d}\mathbf{v}}{\mathrm{d}t} = \frac{\mathrm{d}}{\mathrm{d}t} \left[ \frac{\mathrm{d}\mathbf{r}}{\mathrm{d}t} \right] \tag{9.65}$$

$$\frac{\text{dr}}{\text{d}t} = \frac{\text{ds}}{\text{d}t} \frac{\text{dr}}{\text{ds}}\tag{9.66}$$

$$\mathbf{v} = \frac{\mathbf{ds}}{\mathbf{d}t} \left( \frac{\mathbf{d}r\_0(s)}{\mathbf{ds}} + \frac{\mathbf{d}\mathbf{x}}{\mathbf{ds}} \hat{\mathbf{x}} + s\frac{\mathbf{d}\hat{\mathbf{x}}}{\mathbf{ds}} + \frac{\mathbf{dz}}{\mathbf{ds}} \hat{\mathbf{z}} + z\frac{\mathbf{d}\hat{\mathbf{z}}}{\mathbf{ds}} \right)$$

$$= \frac{\mathbf{ds}}{\mathbf{d}t} \left( \left( 1 + \mathbf{x}/\rho \right) \hat{\mathbf{s}} + \mathbf{x}' \hat{\mathbf{x}} + z' \hat{\mathbf{z}} \right) \tag{9.67}$$

### 9 Spin Codes 235

$$\frac{d\mathbf{v}}{dt} = \left(\frac{d\mathbf{s}}{dt}\right)^2 \frac{d}{ds} \left[ \left( \mathbf{l} + \mathbf{x}/\rho \right) \hat{\mathbf{s}} + \mathbf{x}' \hat{\mathbf{x}} + \mathbf{z}' \hat{\mathbf{z}} \right] \tag{9.68}$$
 
$$= \left(\frac{d\mathbf{s}}{dt}\right)^2 \left[ \left( \frac{2\mathbf{x}'}{\rho} + \mathbf{x} \left( \frac{1}{\rho} \right)' \right) \hat{\mathbf{s}} + \mathbf{z}' \right]$$
 
$$\left( \mathbf{x}'' - \frac{1}{\rho} - \frac{\mathbf{x}}{\rho^2} \right) \hat{\mathbf{x}} + \mathbf{z}'' \hat{\mathbf{z}} \Big]$$

Now calculating the cross product,

$$\begin{split} \frac{d\mathbf{v}}{dt} \times \mathbf{v} &= \left(\frac{\mathbf{d}s}{\mathbf{d}t}\right)^{3} \left[ \hat{\mathbf{x}} \left[ \left(\frac{2\mathbf{x'}}{\rho} - \mathbf{x} \left(\frac{1}{\rho}\right)' \right) \mathbf{z'} - \left(1 + \frac{\mathbf{x}}{\rho}\right) \mathbf{z''} \right] \right] \\ &- \hat{\mathbf{s}} \left[ \mathbf{z'} \left(\mathbf{x''} - \frac{1}{\rho} - \frac{\mathbf{x}}{\rho^2}\right) - \mathbf{x'} \mathbf{z''} \right] \\ &+ \hat{\mathbf{z}} \left[ \left(\mathbf{x''} - \frac{1}{\rho} - \frac{\mathbf{x}}{\rho^2}\right) \left(1 + \frac{\mathbf{x}}{\rho}\right) - \\ &\mathbf{x'} \left(2\frac{\mathbf{x'}}{\rho} + \mathbf{x} \left(\frac{1}{\rho}\right)' \right) \right] \end{split}$$

$$\approx \left(\frac{\mathbf{d}s}{\mathbf{d}t}\right)^3 \left[ -\hat{\mathbf{x}}z'' + \hat{\mathbf{s}} \frac{\mathbf{z'}}{\rho} + \hat{\mathbf{z}} \left(\mathbf{x''} - \frac{1}{\rho}\right) \right] \tag{9.69}$$

Where at the last step we drop all terms higher than second order in *x, z, s* and <sup>1</sup> *ρ* and their derivatives. The expression for **B**<sup>⊥</sup> becomes,

$$\mathbf{B}\_{\perp} \approx \frac{\frac{m\mathcal{I}\boldsymbol{v}}{e} \left[ -\hat{\boldsymbol{x}}\boldsymbol{z}\prime + \hat{\boldsymbol{s}}\frac{\boldsymbol{z}\prime}{\rho} + \hat{\boldsymbol{z}}\left(\boldsymbol{x}\prime - \frac{1}{\rho}\right) \right]}{\left[ \left(1 + \frac{\boldsymbol{x}}{\rho}\right)^{2} + \boldsymbol{x}\prime^{2} + \boldsymbol{z}\prime^{2} \right]^{3/2}}$$

$$\approx \frac{m\mathcal{I}\boldsymbol{v}\prime}{e} \left[ -\hat{\boldsymbol{x}}\boldsymbol{z}\prime + \hat{\boldsymbol{s}}\frac{\boldsymbol{z}\prime}{\rho} + \hat{\boldsymbol{z}}\left(\boldsymbol{x}\prime - \frac{1}{\rho}\right) \right]. \tag{9.70}$$

Here the denominator goes to 1 when we drop all the second order terms in *x, z, s* and 1*/ρ* and their derivatives. We also used the fact that,

$$\frac{\mathrm{ds}}{\mathrm{dt}} = \frac{v}{\left[\left(1 + \frac{\chi}{\rho}\right)^2 + \chi'^2 + z'^2\right]^{1/2}}.\tag{9.71}$$

For the parallel field we get,

$$\begin{split} \mathbf{B}\_{\parallel} &= \frac{(\mathbf{v} \cdot \mathbf{B})\mathbf{v}}{v^{2}} \\ &= \frac{\left(\frac{\mathbf{d}\mathbf{s}}{d\mathbf{r}}\right)^{2}}{v^{2}} \Bigg[ \left(1 + \frac{\mathbf{x}}{\rho}\right)B\_{s} + \mathbf{x}'B\_{x} + \mathbf{z}'B\_{\hat{z}} \Bigg] \Bigg[ \left(1 + \frac{\mathbf{x}}{\rho}\right)\hat{\mathbf{s}} \\ &+ \mathbf{x}'\hat{\boldsymbol{\chi}} + \mathbf{z}'\hat{\boldsymbol{z}} \Bigg] \\ &= \frac{\left[\left(1 + \frac{\mathbf{x}}{\rho}\right)B\_{s} + \mathbf{x}'B\_{x} + \mathbf{z}'B\_{\hat{z}}\right] \left[\left(1 + \frac{\mathbf{x}}{\rho}\right)\hat{\mathbf{s}} + \mathbf{x}'\hat{\boldsymbol{\chi}} + \mathbf{z}'\hat{\boldsymbol{z}}\right]}{\left[\left(1 + \frac{\mathbf{x}}{\rho}\right)^{2} + \mathbf{x}'^{2} + \mathbf{z}'^{2}\right]} \\ &\approx \left(1 - 2\frac{\mathbf{x}}{\rho}\right) \Bigg[ \hat{\mathbf{s}} \left(B\_{s} + 2\frac{\mathbf{x}}{\rho}B\_{s} + \mathbf{x}'B\_{\hat{x}} + \mathbf{z}'B\_{\hat{z}}\right) + \\ &\hat{\mathbf{x}}\mathbf{x}'B\_{s} + \hat{\mathbf{z}}\hat{\mathbf{z}}\big{B}\_{s} \Bigg] \\ &\approx \left(B\_{s} + \mathbf{z}'B\_{\hat{z}}\right)\hat{\mathbf{s}} \end{split} \tag{9.72}$$

Here the first approximation involves dropping terms *x, z, s* and 1*/ρ* and their derivatives to second order and above. The second approximation involves assumptions of the relative magnitude of *Bs* and *z Bz* to be *>> Bsx/ρ , x Bx , z Bs*. This assumes no solenoid type magnets. The vertical field can be approximated using the strength of the dipole guide field, *Bz* ≈ −[*Bρ*] *<sup>ρ</sup>* . The longitudinal field can be approximated using Ampere's law and assuming that *Bs(z* = 0*)* = 0.

$$\begin{aligned} \frac{\partial B\_s}{\partial z} &= \frac{\partial B\_z}{\partial s} = -B\rho \left(\frac{1}{\rho}\right)' \\ B\_s &= -B\rho z \left(\frac{1}{\rho}\right)' \hat{s} \\ \mathbf{B}\_{\parallel} &\approx \left(-B\rho z \left(\frac{1}{\rho}\right)' + \frac{z'}{\rho} B\rho\right) \hat{s} = -B\rho \left(\frac{z}{\rho}\right)' \hat{s} \end{aligned} \tag{9.73}$$

Putting this into the T-BMT equation we obtain,

$$\begin{aligned} \frac{d\mathbf{S}}{ds} &\approx v \left(\frac{\mathbf{d}t}{\mathbf{ds}}\right) \mathbf{S} \times \mathbf{\mathcal{Q}} \approx \mathbf{S} \times \mathbf{\mathcal{Q}}\\ \Omega\_{\mathbf{x}} &= -(1 + G\boldsymbol{\gamma})z''\\ \\ \Omega\_{\boldsymbol{s}} &= (1 + G\boldsymbol{\gamma})z'/\rho - (1 + G) \left(\frac{z}{\rho}\right)'\\ \\ \Omega\_{\boldsymbol{\varepsilon}} &= x''(1 + G\boldsymbol{\gamma}) - \frac{1 + G\boldsymbol{\gamma}}{\rho} \end{aligned}$$

### 9 Spin Codes 237

Here we used *Bρ* <sup>=</sup> *γ mv/e* and approximate <sup>d</sup>*<sup>t</sup>* <sup>d</sup>*<sup>s</sup>* ≈ 1*/v* since the other terms will introduce orders of *x, s, z* and 1*/ρ* beyond our approximation. Accounting for the derivatives of the *x, s, z* basis vectors of **S** we can obtain,

$$\begin{aligned} \frac{\mathbf{d}S\_{\mathbf{x}}}{\mathbf{d}s} &= S\_s(\boldsymbol{\Omega}\_{\boldsymbol{\varepsilon}} + 1/\rho) - \boldsymbol{\Omega}\_s \mathbf{S}\_{\boldsymbol{\varepsilon}} \\ \frac{\mathbf{d}S\_{\boldsymbol{s}}}{\mathbf{d}s} &= -S\_{\boldsymbol{\chi}}(\boldsymbol{\Omega}\_{\boldsymbol{\varepsilon}} + 1/\rho) + \boldsymbol{\Omega}\_{\boldsymbol{\chi}} \mathbf{S}\_{\boldsymbol{\varepsilon}} \\ \frac{\mathbf{d}S\_{\boldsymbol{\varepsilon}}}{\mathbf{d}s} &= S\_{\boldsymbol{\chi}} \boldsymbol{\Omega}\_{\boldsymbol{s}} - \boldsymbol{\Omega}\_{\boldsymbol{\chi}} \mathbf{S}\_{\boldsymbol{s}} \end{aligned}$$

If we change to a basis vector which rotates with the beam *(e*ˆ1*, e*ˆ2*, e*ˆ3*)* we obtain,

$$\begin{aligned} \frac{d\mathbf{S}}{ds} &= \mathbf{f} \times \mathbf{S} \\\\ f\_1 &= -\Omega\_\chi = (1 + G\gamma)z'' \\\\ f\_2 &= -\Omega\_\delta = -(1 + G\gamma)z'/\rho + (1 + G)\left(\frac{z}{\rho}\right)' \end{aligned}$$

$$f\_3 = -(\Omega\_\varepsilon + 1/\rho) = -x''(1 + G\gamma) + \frac{G\gamma}{\rho} \tag{9.74}$$

# • **? Exercise 2**

Define a two-component *spinor* such that the *j* -th component of the spin vector is given by

$$S\_{\vec{J}} = \langle \Psi | \sigma\_{\vec{J}} | \Psi \rangle = \Psi^{\dagger} \sigma\_{\vec{J}} \Psi. \tag{9.75}$$

Here denotes a classical vector with components *u* and *d*, which are related to the three components of **S** by

$$\begin{aligned} S\_1 &= \boldsymbol{u}^\* \boldsymbol{d} + \boldsymbol{u} \boldsymbol{d}^\* \\ S\_2 &= -\mathbf{i} (\boldsymbol{u}^\* \boldsymbol{d} - \boldsymbol{u} \boldsymbol{d}^\*) \\ S\_3 &= |\boldsymbol{u}|^2 - |\boldsymbol{d}|^2. \end{aligned} \tag{9.76}$$

Using *σ* = *(σx , σs, σz)*, the vector of the Pauli spin matrices, and *ζ (s)* = −*ω*1+i*ω*2, show that Eq. 9.61 can be transformed into,

$$\frac{d\Psi}{ds} = -\frac{\mathrm{i}}{2}(\boldsymbol{\sigma} \cdot \mathbf{f})\Psi = -\frac{\mathrm{i}}{2}H\Psi = -\frac{\mathrm{i}}{2}\begin{pmatrix} \frac{G\boldsymbol{\gamma}}{\rho} & -\boldsymbol{\zeta}(\boldsymbol{s})\\ -\boldsymbol{\zeta}(\boldsymbol{s})^{\*} & -\frac{G\boldsymbol{\gamma}}{\rho} \end{pmatrix}\Psi,\tag{9.77}$$

where we have dropped the first term in *ω*3, −*(*1+*Gγ )x*, since it is small compared to *Gγ* .

### **Solution**

$$\frac{d\mathbf{S}}{ds} = \mathbf{f} \times \mathbf{S} \tag{9.78}$$

$$\mathbf{S} = \Psi^\dagger \sigma \Psi \tag{9.79}$$

$$\begin{aligned} \mathbf{S}' &= \Psi^{\dagger\prime} \sigma \Psi + \Psi^{\dagger} \sigma \Psi^{\prime} \\ &= \mathbf{f} \times (\Psi^{\dagger} \sigma \Psi) = \Psi^{\dagger} (\mathbf{f} \times \sigma) \Psi \\ &= -\frac{i}{2} \Psi^{\dagger} [(\sigma \cdot \mathbf{f})(\sigma) - (\sigma)(\sigma \cdot \mathbf{f})] \Psi \end{aligned} \tag{9.80}$$

where we used the identity [*σ* · **f***, σ*] = 2i*(***f** × *σ)*. We can then identify that

$$
\Psi' = -\frac{i}{2}(\boldsymbol{\sigma} \cdot \mathbf{f})\Psi \tag{9.81}
$$

# • **? Exercise 3**

Using the differential relation d*θ* = d*s/ρ*, one may transform 9.77 so as to make *θ* the independent variable. Then, considering the effects of a *single* resonance, wherein *ζ (θ )* becomes *Ke*−i*Kθ* , the T-BMT equation becomes

$$\frac{d\Psi}{d\theta} = -\frac{\mathrm{i}}{2} \begin{pmatrix} G\chi & -\epsilon\_K e^{-\mathrm{i}K\theta} \\ -\epsilon\_K^\* e^{\mathrm{i}K\theta} & -G\chi \end{pmatrix} \Psi. \tag{9.82}$$

At this point, assume *Gγ* = constant, and transform the spinor equation 9.82 into the *resonance precessing frame* by defining

$$\Psi\_K(\theta) = e^{\frac{i}{2}K\theta\sigma\_\natural}\Psi(\theta). \tag{9.83}$$

### 9 Spin Codes 239

Show that

$$\frac{\mathrm{d}\Psi\_K}{\mathrm{d}\theta} = \frac{\mathrm{i}}{2} \begin{pmatrix} K - G\gamma & \epsilon\_K \\ \epsilon\_K^\* & G\gamma - K \end{pmatrix} \Psi\_K. \tag{9.84}$$

**Solution**

$$
\Psi = \begin{pmatrix} e^{-\frac{iK\theta}{2}} & 0 \\ 0 & e^{\frac{iK\theta}{2}} \end{pmatrix} \Psi\_K \tag{9.85}
$$

$$
\Psi\_K = \begin{pmatrix} e^{\frac{iK\theta}{2}} & 0 \\ 0 & e^{-\frac{iK\theta}{2}} \end{pmatrix} \Psi \tag{9.86}
$$

$$
\Psi'\_K = \frac{\mathrm{i}K}{2} \begin{pmatrix} e^{\frac{\mathrm{i}K\theta}{2}} & 0 \\ 0 & -e^{-\frac{\mathrm{i}K\theta}{2}} \end{pmatrix} \Psi + \begin{pmatrix} e^{\frac{\mathrm{i}K\theta}{2}} & 0 \\ 0 & e^{-\frac{\mathrm{i}K\theta}{2}} \end{pmatrix} \Psi' \tag{9.87}
$$

$$\Psi\_K' = \frac{\mathrm{i}K}{2} \begin{pmatrix} e^{\frac{\mathrm{i}K\theta}{2}} & 0\\ 0 & -e^{-\frac{\mathrm{i}K\theta}{2}} \end{pmatrix} \Psi - \frac{\mathrm{i}}{2} \begin{pmatrix} e^{\frac{\mathrm{i}K\theta}{2}} & 0\\ 0 & e^{-\frac{\mathrm{i}K\theta}{2}} \end{pmatrix} \begin{pmatrix} G\gamma & -\epsilon\_K e^{-\mathrm{i}K\theta} \\ -\epsilon\_K^\* e^{\mathrm{i}K\theta} & -G\gamma \end{pmatrix} \Psi. \tag{9.88}$$

$$\Psi\_K^{\prime} \qquad \qquad = \frac{iK}{2} \begin{pmatrix} e^{\frac{iK\theta}{2}} & 0 \\ 0 & -e^{-\frac{iK\theta}{2}} \end{pmatrix} \begin{pmatrix} e^{-\frac{iK\theta}{2}} & 0 \\ 0 & e^{\frac{iK\theta}{2}} \end{pmatrix} \Psi\_K$$

$$ -\frac{i}{2} \begin{pmatrix} e^{\frac{iK\theta}{2}} & 0 \\ 0 & e^{-\frac{iK\theta}{2}} \end{pmatrix} \begin{pmatrix} G\gamma & -\epsilon\_K e^{-iK\theta} \\ -\epsilon\_K^\* e^{iK\theta} & -G\gamma \end{pmatrix} \begin{pmatrix} e^{-\frac{iK\theta}{2}} & 0 \\ 0 & e^{\frac{iK\theta}{2}} \end{pmatrix} \Psi\_K. \quad (9.89)$$

$$
\Psi'\_K = \frac{\mathrm{i}}{2} \begin{pmatrix} K & 0 \\ 0 & -K \end{pmatrix} \Psi\_K - \frac{\mathrm{i}}{2} \begin{pmatrix} G\gamma & -\epsilon\_K \\ -\epsilon\_K^\* & -G\gamma \end{pmatrix} \Psi\_K. \tag{9.90}
$$

$$
\Psi\_K' = \frac{\mathrm{i}}{2} \begin{pmatrix} K - G\gamma & \epsilon\_K \\ \epsilon\_K^\* & G\gamma - K \end{pmatrix} \Psi\_K. \tag{9.91}
$$

# • **? Exercise 4**

The code SpinTrack.cc also known as T-BMT, integrates the singleresonance T-BMT equation 9.84 with two orthogonal snakes located at *θ* = 0

```
Table 9.1 T-BMT code's input file Resonance.in
```

```
k0: 452
w0R,w0I: 0.0 0.0
k1: 453
w1R,w1I: 0.0 0.0
k2: 393
w2R,w2I: 0.432733 0.112896
k3: 392
w3R,w3I: 0.0 0.0
k4: 394
w4R,w4I: 0.0 0.0
k5: 422
w5R,w5I: 0.0 0.0
k6: 423
w6R,w6I: 0.0 0.0
```
and *θ* = *π*, with an axis of rotation oriented at angle *φ* = ±*π/*4, as is the case in RHIC [31]. The code takes as input the file Resonance.in (Table 9.1 [31]).

In this version of the code, we integrate the single-resonance T-BMT equation by taking the matrix exponential of Eq. 9.84. In this case, our single resonance is located at *K* = k2 = 393 + *Qy* = 422*.*67 (*Qy* = 29*.*67), with *strength K* = 0*.*432733 + i 0*.*112896. The code's default initial value for *Gγ*<sup>0</sup> is 414.8, with an acceleration rate of <sup>d</sup>*Gγ* <sup>d</sup>*<sup>θ</sup>* <sup>=</sup> <sup>3</sup>*.*74118×10−<sup>6</sup> rad−<sup>1</sup> (as in RHIC). The default number of turns is NT = 670*,*000.

• With Resonance.in in your directory, run the code using:

mpiexec -n 1 ./SpinTrack.out This will generate a file called:

TBTAmp1.000Tau5.000Qs8.900CV2.00Q29.670R0.dat

After some header information, it lists the turn number, value of G*γ* , vertical component of the spin vector *Sy* , and the estimated Envelope of the Spin vector given by the following equation:

$$\begin{aligned} \delta &= K - G\gamma\\ \lambda &= \sqrt{\delta^2 + |\epsilon\_k|^2} \\ b &= \frac{|\epsilon\_K|}{\lambda} \sin \frac{\lambda \pi}{2} \\ S\_{\text{env}} &= 1 - 8b^2(1 - b^2) \end{aligned} \tag{9.92}$$

Identify the locations of the nodes and anti-nodes.

• Now run the same code using the command

mpiexec -n 1 ./SpinTrack.out \ nstrobe= 1 Ggam0= 420.0 NT= 250000

In this case, you are now starting around an anti-node and turning off stroboscopic averaging to orient your initial spin vector. What is different about this tracking? How do you think you could compute the final polarization in this case?

• Run it again turning back on stroboscopic averaging by using:

mpiexec -n 1 ./SpinTrack.out Ggam0= 420.0 NT= 250000

How does the spin vector behave now?

• Run the code again, now using more particles:

mpiexec -n 20 ./SpinTrack.out Ggam0= 420.0 NT= 250000

Now the code should produce 20 files one for each particle where the complex phase of the spin resonance is distributed evenly over 0 to 2*π*. The "R0", "R1" indicate the particle number for each file. The python script AvgFiled.py lists all the TBT\*.dat files in the current directory and then reads them in calculating an average for the vertical Spin component. Run it using:

python AvgFiled.py *>* YourFileName.dat

It generates a file listing turn number, G*γ* , and average vertical Spin. Notice how the average trajectory converges.

# **References**


P. Adams et al., Numerical simulation of spin dynamics with spin flipper in RHIC. MOPMF018, IPAC2018, Vancouver, BC, Canada. https://accelconf.web.cern.ch/ipac2018/ papers/mopmf018.pdf


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 10 Polarized Ion Sources**

245

**Anatoli Zelenski**

**Abstract** State-of-the art of polarized proton, H<sup>−</sup> ion, D<sup>+</sup> (D−) and 3He2<sup>+</sup> ion beam sources are presented. Feasibility studies of new techniques are in progress at BNL and other laboratories. Polarized deuteron beams will be required for the polarization program at the Dubna NICA collider and at the deuteron Electric Dipole Moment experiment. Experiments with polarized 3He2<sup>+</sup> ion beams are a part of the experimental program at the future Electron Ion Collider.

# **10.1 Introduction**

Polarization is an intrinsic property of light (photons), electrons, protons, nuclear beams, and the study of polarization effects provides essential information on particle structure and their Interactions. Collider experiments with polarized beams at RHIC [1] and HERA (at HERA, the experimental program with polarized electron beam and polarized internal target, HERMES, has been completed) provide crucial tests of QCD and Electroweak interaction. Polarization asymmetries and parity violation are strong signatures for the identification of the fundamental processes, which are otherwise inaccessible. Such experiments require the maximum available luminosity, and therefore polarization must be obtained as an extra beam quality

A. Zelenski (-)

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Collider Accelerator, Brookhaven National Laboratory, Upton, NY, USA e-mail: zelenski@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_10

without sacrificing intensity. This is already the case for electron accelerators. In a storage ring, an electron beam is self-polarized by the Sokolov-Ternov effect. For linear accelerators, a great effort in polarized electron source development was finally rewarded by achievement of up to 90% polarization and high beam intensity, which will be sufficient to run high-current accelerators at Jefferson Laboratory or the future International Linear Collider at maximum intensity with polarized beam. There were proposals to polarize the high-energy proton beam in a storage ring by the Stern-Gerlach effect (or antiprotons by the spin-filtering technique). But so far, the only feasible option is to accelerate the polarized beam produced in the source and make sure that polarization will survive during acceleration and storage. High intensity polarized H− ion sources are presently a common choice for high-energy accelerators due to the advantage of stripping injection into the accelerator ring. Polarized deuteron beam will be required for the deuteron EDM (Electric Dipole Moment) experiment and is also planned for NICA collider at JINR, Dubna [2]. Experiments with accelerated polarized 3He2<sup>+</sup> ion beams will be a part of the program at future Electron Ion Collider [3].

# **10.2 Polarization Techniques**

# *10.2.1 Spin Filtering Techniques*

The basic feature of these polarization techniques is an attenuation: scattering out, adsorption, defocusing, quenching of unwanted part of light, electron, atomic, proton, or nuclei beams having "unwanted" direction of polarization. The adsorption of one component of linear polarization of light in some materials is called dichroism and is widely used in science, technology, and everyday life (polarization sunglasses, photography). A strong spin dependence of thermal energy neutron beam capture in a polarized 3He gas cell is often used for neutron beam polarization and polarization analysis. In Lamb-shift polarized sources the metastable hydrogen atoms in unwanted spin states are quenched by the "spin-filter" to the ground states and remaining polarized atoms can be produced by selective ionization from metastable states.

Selective focusing by sextupole separating magnets is used for hydrogen (deuterium) beam polarization by electron spin in Atomic Beam Sources (ABS) of polarized ions and polarized internal targets. In these sources the atomic hydrogen is produced by dissociation of hydrogen molecules in RF discharge. Hydrogen gas flows out the dissociator volume to vacuum forming gaseous jet. The atomic hydrogen beam is formed then from central part of the jet using skimmers and diaphragms. A typical velocity of atoms in the beam is about (<sup>1</sup> <sup>−</sup> <sup>2</sup>) <sup>×</sup> <sup>10</sup><sup>5</sup> cm/s, which is achieved by cooling of the dissociator nozzle to a temperature of 30–80 K. The sextupole magnetic field acts on electron magnetic moment axially aligned with the field gradient towards magnet tips as a focusing lens. The other component having opposite electron spin direction is defocused. Then the electron polarization is transferred to the protons by means of radio-frequency transitions. The atomic beam of a selected spin-state is directed into an ionizer (or a storage cell). The polarized proton or H− ion beam can be produced by ionization of atomic beam in magnetic field of about 1.5 kG, which is sufficient to break electron-proton spin coupling while preserving proton polarization. The ABS beam can be used as an internal target in accelerator-collider storage ring (polarized H-jet polarimeter at RHIC [4]), or for feeding storage cell type of internal targets. There is a proposal to use polarized atomic hydrogen storage cell for antiproton polarization in the storage ring by filtering (removing) of unwanted states (PAX proposal for HESR at FAIR [5]).

# *10.2.2 Optical Pumping*

Electron or nuclear polarized atoms can be obtained in process of absorption of polarized photons from external source of polarized light and subsequent spontaneous emission of un-polarized photon (optical pumping). Angular momentum of atom electron shell is changed during the process and atom takes on electron polarization. The electron polarization is transferred to nuclear through spinspin interaction if optical pumping takes place in sufficiently low magnetic field. Population of spin states of atoms is changed during the optical pumping without filtering process due to absorption of external polarized photons which angular momentum is transmitted to atoms. For optical pumping of rubidium atoms laser radiation with wavelength of 795 nm is used to excite transitions: 5S1/<sup>2</sup> → 5P1/2. Polarized 3He atoms are obtained by exciting transitions 23S1/<sup>2</sup> <sup>→</sup> 23P0 (1083 nm). Direct optical pumping of hydrogen atoms cannot be used so far for polarized proton production due to absence of suitable lasers with wavelength of 121.5 nm (Lyman alpha radiation). Doppler-shift for counter propagating relativistic atomic hydrogen and laser beam can shift the transition wavelength to an accessible range. The relativistic atomic hydrogen beam of a 500–800MeV energy can be produced by stripping of accelerated H− ion beam in the carbon stripping foil. For these energies the 121.5 nm transition wavelength will be shifted to 330–410 nm range, which can be produced by using the second harmonics of tunable lasers [6].

# *10.2.3 Polarization-Transfer Technique*

In any type of polarized proton (H− ion) source the first step is the generation of an electron-spin polarized atomic beam (see Fig. 10.1). The polarization is then transferred to the protons by hyperfine interaction and finally the beam is ionized. The difference is in the velocity of the atomic beam. It is comparatively easy to polarize a "slow" (thermal energy) beam by using separating magnets, as discussed

**Fig. 10.1** Ion polarization techniques. Three-step process: first-electron spin polarization; secondelectron to proton polarization transfer; third-ionization to positive or negative ion beam

above. The advantages of using "fast" (a few keV energy) beams are higher intensity and simple, more efficient ionization. The electron-spin polarization of the "fast" H− beam is produced either in a charge-exchange process, when primary protons capture polarized electrons from polarized atoms in a vapor cell, or in spin-exchange collisions. In this technique optical pumping is used to get polarized alkali atoms. This technique is called an "Optically-Pumped Polarized Ion Source" (OPPIS), although polarized electrons can also be captured from a ferromagnetic foil (as in the original Zavoiski's proposal), or from hydrogen, or an alkali-metal atomic beam polarized by separating magnets [7].

There is no space-charge limitation in the spin-exchange collisions between hydrogen and Rb atoms therefore higher beam intensity can be achieved in this scheme. But the cross-section of the spin-exchange collisions is smaller than that of the charge-exchange collisions and higher (about 10<sup>15</sup> atoms/cm2) alkali vapor thickness is required, which can be produced only in a cell 100 cm long (due to radiation trapping limit on the maximum vapor density). The proposed scheme in which atomic H collisions in the mixture of He gas and Rb vapor in the same cell, i.e. combining charge-exchange and spin-exchange collisions allows the Rb vapor thickness to be reduced to 4 <sup>×</sup> <sup>10</sup><sup>14</sup> atoms/cm2, which can be produced in a cell 40 cm long.

# **10.3 Atomic Beam Source with Resonant Plasma Ionizer**

A polarized ABS ion source with resonant plasma ionizer has been developed at INR Moscow [8]. A deuterium plasma injector is used in this source for production of polarized H− ions. The injector generates plasma consisting mainly from D+ and D− ions. The present version of the plasma injector is shown schematically in Fig. 10.2. The plasma flux from the arc-discharge plasma source is enriched by negative ions in a surface-plasma converter. Positive ions are converted into neutral atoms with eV energy in collisions with a neutralizer internal surface. Polarized atomic hydrogen beam is injected into the plasma and polarized H− ions are produced via reaction: → <sup>H</sup><sup>0</sup> <sup>+</sup>D<sup>−</sup> <sup>→</sup> → H<sup>−</sup> +D0.

The plasma flux is guided to the internal surface of the neutralizer by the magnetic field created by the plasma coil (in longitudinal direction) and by the converter electromagnet (transversal direction). Plasma ions interact with the neutralizer surface and most of them are reflected as neutral hot atoms. The reflected hot atoms hit the converter cylinder internal (molybdenum) surface where the atoms are converted partially into negative ions and injected into the ionization region along the fringing solenoid field lines. With this ionizer a polarized H− ion beam with peak current of 4 mA has been obtained with D− ion beam current of 62 mA. The polarization of the H<sup>−</sup> ion beam was measured to be 0.91 ± 0.03. The Lamb shift polarimeter has been used for the polarization measurements. Figure of merit of the polarized H<sup>−</sup> ion beam produced **P2I** has record value of 3.2 mA. Efficiency of direct conversion of polarized hydrogen atoms into polarized H− ions reached of 12.5%. Polarized D− ion beam with peak intensity up to 2 mA

**Fig. 10.2** The plasma injector of D+ and D− ions

and polarization up to 90% from nominal of vector polarization ±1 and tensor polarization of +1,-2 have been obtained from the polarized ion source CIPIOS at IUCF [9]. The source was developed in a collaboration of IUCF and INR Moscow. The source had a nearly resonant charge-exchange plasma ionizer and produced also polarized H− ions (1.8 mA peak) and unpolarized H− and D− ion beams (40 mA and 30 mA respectively) with pulse duration of 300 μs and repetition rate of 2 Hz. The emittance was minimized by a carefully designed focusing of an atomic hydrogen beam by permanent magnet sextupoles with magnetic field up to 1.4 T and by restriction of magnetic field in a charge-exchange region to value ≤ 1.0 kG. The normalized emittance of the polarized ion beams was measured to be 1.2 πmm mrad.

# **10.4 Polarized Source for NICA**

The program of polarization research at NICA Ion Collider (Joint Institute for Nuclear Research at Dubna, Russia) is based on the acceleration of polarized proton beams up to 12 Gev and deuteron beams up to 5.6 GeV/nucleon beam energy in the NUCLOTRON accelerator and beam injection in the collider rings. A high intensity pulsed source of polarized protons and deuterons is required to achieve the number of accelerated deuterons of <sup>∼</sup>10<sup>10</sup> deuterons/cycle (with the present one turn injection scheme, 10 µs pulse duration, 1 Hz repetition rate). A new polarized ABS was developed in a collaboration of JINR and INR Moscow. Parts of the CIPIOS source from IUCF were delivered to JINR and will be used for the Dubna polarized deuteron source (see Fig. 10.3) [10].

**Fig. 10.3** NICA polarized proton, D+ ion sources with the resonant plasma ionizer

A project goal is a polarized deuteron beam from the source with a peak intensity of 10 mA and polarization of 90% from nominal vector polarization ±1 and tensor polarization +1, −2. The polarized current of a 6 mA and polarization 88+/−5% were obtained in Run-2016-17. A nearly resonant charge-exchange deuteron plasma ionizer with storage cell will be used to increase intensity of the polarized ion beam from the source, reduce the polarized ion beam emittance and the unpolarized proton current in the charge-exchange region, in comparison with a source without the storage cell, and respectively reduce background current of H2+ ions, which will not be separated from polarized deuterons in the bending magnet. The source development is in progress for further beam intensity and polarization improvements.

# **10.5 Polarized Source with Cesium Beam Ionizer at COSY**

The principle of the source is an ionization of pulsed polarized hydrogen or deuterium beams (20 ms pulse duration, 0.5 Hz repetition rate) in collisions with a pulsed neutral cesium beam having a kinetic energy of about 45 keV [11]. The Cs ion emitter is a porous tungsten button on a molybdenum heater. The pulsed operation of the Cesium gun is controlled via a high voltage electrode. The parameter space for the operation of the gun was carefully mapped to find a setting that delivered a nearly rectangular pulse shape. This was an important prerequisite for the precise transport of this beam, which is strongly governed by space charge effects in the initial phase. After the Cs+ beam formation to match the polarized hydrogen beam in the ionizing region the Cs+ beam is neutralized in the cesium neutralizer cell. In a charge exchange reaction is taking place in a solenoid field, negatively charged hydrogen, or deuteron, ions are created and accelerated toward the extraction elements. Then the ions are bent magnetically by 90◦, passed through a Wien-filter and enter the transporting source beam line that guides them into the cyclotron. The new record value of 50µA and 90% polarization was reached during routine source operation in 2005. This exceeds the original design value of 30µA. It was the result of the optimization of all source components [12].

A breakthrough decision was to develop a pulsed cesium beam matched to the short injection period of up to 20 ms for COSY, thus virtually eliminating the severe sputtering damage that had been an obstruction for reliable operation. Beam diagnostics, like beam scanner, Faraday cups and viewer, for the cesium beam were added to successfully shape the transverse phase space for optimal overlap with the atomic hydrogen or deuterium beam.

# **10.6 Optically Pumped Polarized H− Ion Source at RHIC**

A novel polarization technique successfully implemented for the upgrade of the RHIC polarized H− ion source to higher intensity and polarization for the first production Run-2013 [13]. In this technique, a proton beam inside the high magnetic field solenoid produced by ionization of the atomic hydrogen beam (from an external source) in the He-gas ionizer cell. Proton polarization is produced by the process of polarized electron capture from the optically-pumped Rb vapor. Polarized beam intensity produced in the source exceeds 4.0 mA. Strong space-charge effects cause significant beam losses in the LEBT (Low Energy Beam Transport, 35.0 keV beam energy) line. The LEBT was modified to reduce losses. As a result, 1.4 mA of polarized beam was transported to the RFQ and 0.7 mA was accelerated in linac to 200 MeV. A maximum polarization of 84% (in the 200 MeV polarimeter) was measured at 0.3 mA beam intensity and 80% polarization was measured at 0.6 mA. The upgraded source reliably delivered beam for the 2013 polarized run in RHIC at <sup>√</sup><sup>S</sup> <sup>=</sup> <sup>510</sup> GeV. This was a major factor contributed to the RHIC polarization increase to over 60% for colliding beams.

# *10.6.1 OPPIS with the Atomic Hydrogen Beam Injector*

The polarized beam for the RHIC spin physics experimental program is produced in the Optically-Pumped Polarized H− Ion Source (OPPIS) [14]. An Electron Cyclotron Resonance (ECR) ion source was used as the primary proton source in the old operational polarized source. The ECR source was operated in a high magnetic field. The proton beam produced in the ECR source had a comparatively low emission current density and high beam divergence. In pulsed operation, suitable for application at high-energy accelerators and colliders, the ECR source limitations can be overcome by using a high brightness proton source outside the magnetic field instead of the ECR source. In this technique (which was implemented for the first time at INR, Moscow [15]), the proton beam is focused and neutralized in a hydrogen cell producing the high brightness 6.0–8.0 keV atomic H0 beam. The atomic H0 beam is injected into the superconducting solenoid, where both the He ionizer cell and the optically-pumped Rb cell are situated in the 25–30 kG solenoid field. The solenoid field is produced by a new superconducting solenoid with a re-condensing cooling system. The injected H atoms are ionized in the He cell with 60–80% efficiency to form a low emittance intense proton beam and then enter the polarized Rb vapor cell (see Fig. 10.4). The protons pick up polarized electrons from the Rb atoms to become a beam of electron-spin polarized H atoms (similar to the ECR based OPPIS). A negative bias of about 3.0–5.0 kV applied to the He cell decelerate the proton beam produced in the cell to the 2.0–3.0 keV beam energy, optimal for the charge-exchange collisions in the rubidium and sodium cells. This allows energy separation of the polarized hydrogen atoms produced after

**Fig. 10.4** A new polarized source layout: (1) atomic hydrogen injector; (2) pulsed He—gaseous ionizer cell; (3) optically-pumped Rb-vapor cell; (4) Sona-transition; (5) Na-jet ionizer cell

lower energy proton neutralization in Rb-vapor and residual hydrogen atoms of the primary beam.

# *10.6.2 Fast Atomic Beam Source Development*

In the atomic hydrogen beam source, the primary proton beam is produced by a four-grid multi-aperture ion extraction optical system and neutralized in the H2 gas cell downstream from the grids. A high-brightness atomic hydrogen beam was obtained in this injector by using a plasma emitter with a low transverse ion temperature (of about 0.2 eV), which is formed by plasma jet expansion from the arc plasma generator [16]. The multi-hole grids are spherically shaped to produce "geometrical" beam focusing. The grids are made of 0.4 mm thick molybdenum plates. Holes (0.8 mm diameter) in the plates were produced by photo-etching techniques. The hole array forms a hexagonal structure with a step of 1.1 mm and outer diameter of 5.0 cm. The grids were shaped by re-crystallization under pressure at high temperature and were welded to stainless steel holders by a pulsed CO2 laser. At an emission current density of 470 mA/cm2, the angular divergence of the produced beam was measured to be ≈10–12 mrad.

The focal length of the spherical ion extraction system was optimized for the OPPIS application, which is characterized by a long polarizing structure of the charge-exchange cells and small (2.0 cm diameter) Na-jet ionizer cell, which is located 240 cm from the source (see Fig. 10.4). An optimal drift-space length of about 140 cm is required for convergence of the 5 cm (initial diameter) beam to 2.5 cm diameter He-ionizer cell. About 20% of the total beam intensity (≈3.5 A) can be transported through the Na-jet cell acceptance by using the optimal extraction grid system with a focal length: F≈200 cm. Three spherical IOS were tested on the test-bench at BNL. The focusing lengths of IOS #1 and #3 were 150 cm and for IOS#3 F≈250 cm, which allowed study of optimal beam formation. IOS#2 produced about 500 mA equivalent atomic H beam within the 2.0 cm diameter Najet ionizer acceptance (at the distance 240 cm from the source) and 16 mA H− ion beam current.

# *10.6.3 Helium Ionizer Cell: Beam Energy Separation*

The He-ionizer cell is a 40 cm long stainless-steel tube with an inside diameter 25.4 mm (see Fig. 10.5). A new fast "electro-magnetic" valve for He-gas injection to the cell was developed for operation in the 30 kG solenoid field. In this valve, a pulsed current of about 100 A is passed through the flexible springing plate (made of beryllium bronze foil with a thickness of 0.5 mm). The Lorentz force: F = eL [I×B] = 15 N for a L=5 cm long plate. The plate is fixed at one end and this force bends the plate and opens the small (0.5 mm diameter) hole which is sealed with a Viton O-ring. The pulsed current rise-time is ≈50µs and gas pressure rise time is about 100µs.

The proton beam produced in the He-cell is decelerated from 6.5 keV to 2.5 keV by a negative potential of 4.0 keV applied to the cell. At the 2.5 keV beam energy, the H<sup>−</sup> ion yield in the sodium ionizer cell is near maximum (≈8.4%) and the polarized electron capture cross-section from Rb atoms is also near the maximum of <sup>≈</sup>0.8×10–14 cm2. The deceleration was produced by a precisely aligned (to reduce beam losses) three wire-grid system. A negative bias applied to the first grid at the cell entrance and second grid at the cell exit to trap electrons in the cell for spacecharge compensation. Fine tuning of the grids voltages is required for the polarized beam current optimization and total current reduction of the He-cell pulsed power supply.

**Fig. 10.5** A schematic layout of the He-ionizer cell and deceleration system for the polarized beam energy separation

About 40% residual (which passed the He-cell without ionization) atomic beam component at 6.5 keV energy will pass through the deceleration system and Rb cell and be ionized in Na-cell producing H− ion beam. The H− ion yield at 6.5 keV is about 4%. This is a significant suppression in comparison with the main 2.5 keV beam, but it would be a strong polarization dilution unless further suppression is applied. The H− ion beam acceleration produces polarized H− ion beam with 35 keV beam energy and un-polarized beam with 39.5 keV energy. The un-polarized 39.5 keV beam component is well separated after the 23.7 degree bending magnet in the LEBT. In measurements of beam separation, the beam energy was varied by the accelerating voltage applied to the Na-jet ionizer cell. The residual 6.5 keV un-polarized beam component is strongly suppressed (to less than 2% of polarized beam component).

# **10.7 RHIC Polarized Source Performance**

The new source with atomic beam hydrogen injector and He-ionizer cell was developed in 2010–2012 and commissioned for operation in Run-2013. The use of the high brightness primary proton source resulted in higher polarized beam intensity and polarization delivered for injection to Linac-Booster-AGS-RHIC accelerator complex. Very reliable operation and reduced maintenance time were demonstrated. The new OPPIS intensity and polarization exceeded the old ECRbased source parameters and the source performances were improved in Runs 2014–2015. Further beam intensity and polarization increase were achieved in Run-2017 with; the new IOS for the primary proton beam production, He-ionizer cell operation optimization, and improved LEBT tune efficiency. As a result, of these upgrades, the polarized source delivered 0.5–1.0 mA H− ion beam intensity at 82– 85% polarization as measured after the Linac at 200 MeV beam energy. The source current is significantly higher (in excess of 4.0 mA). The largest beam losses occur during 35 keV beam transport in the long LEBT line and energy separation process. These losses can be reduced by continued optimization of the energy separation system in the He-ionizer cell, optimization of beam acceleration system after the Na-jet ionizer cell, and LEBT line optics improvements.

The beam polarization was measured in the absolute polarimeter at 200 MeV beam energy after the Linac. Polarization losses in AGS depend on beam emittance and corresponding bunch intensity. When extrapolated to zero intensity (small emittance) polarization numbers are consistent with the absolute 200 MeV polarimeter measurements. The AGS bunch intensity for injection to RHIC was about 2.0×10<sup>11</sup> protons/bunch and polarization 70–72% optimized for best RHIC operation. The beam polarization in RHIC was measured with an absolute H-jet polarimeter. As a result, of recent H-jet intensity, detectors, DAQ upgrades and ongoing systematic errors analysis, the statistical accuracy for the single RHIC fill measurement reduced to less than ±3% and systematic error for absolute polarization value to < 0.5% [13]. The steady source and AGS performances resulted in production of high (55–60%) average beam polarization in RHIC. The polarization for colliding beams is higher than average polarization and exceeded 60% for a good fraction of fills.

# **10.8 Polarized 3He2<sup>+</sup> Source for EIC**

The nuclear polarization in polarized 3He nuclei is mostly ( 88.6%) carried by neutrons. The 3He2<sup>+</sup> beam polarization produced in the source can be preserved during acceleration in high-energy synchrotron accelerators like AGS and RHIC by using the "Siberian snake" technique [17]. In effect, in electron-3He nuclei collisions at EIC we can study the fundamental interactions of polarized electron beam with high-energy polarized neutron beam, complementary to the studies of the polarized electrons with polarized proton beam collisions. The proposed polarized 3He2<sup>+</sup> acceleration in RHIC will require about 2×10<sup>11</sup> ions in the source pulse and 10<sup>11</sup> ions in the RHIC bunch. To deliver this intensity in a 20µs pulse duration for the injection to the Booster, the source peak current must be about 2000µA, which is 1000 higher than ever achieved in existed 3He2<sup>+</sup> ion sources. We proposed a new polarization technique for production of high intensity 3He2<sup>+</sup> ion beam, which is based on ionization of 3He gas (polarized by metastability exchange technique) in the Electron Beam Ion Source (EBIS) [18]. The development of the source for EIC is now in progress in collaboration between BNL and MIT.

The EBIS currently produces high charge state ions for injection to the RHIC and will remain the primary source of charged ions from P to U for the eRHIC. In the EBIS, the high intensity (10 A) electron beam is produced by the electron gun with cathode diameter 9.2 mm and injected into the 5.0 T solenoid magnetic field. The electron beam is radially compressed by the magnetic field to the diameter of about 1.5 mm in the ionization region and then expanded before dumping into the electron collector at the other end. Ions are radially confined by the space charge of the electron beam and longitudinally trapped by electrostatic barriers at the ends of the trap region. The ions are extracted by raising the potential of the trap and lowering the barrier [19]. A second 5.0 T solenoid has been constructed as the part of the extended EBIS upgrade. The polarized 3He gas will be injected and ionized in the upstream solenoid, and 3He<sup>+</sup> ions will be trapped and further ionized to the 3He2<sup>+</sup> state in the downstream solenoid (see Fig. 10.6).

The 3He gaseous cell will be placed inside the EBIS "injector" solenoid and the pulsed gas valve (similar to OPPIS valve) will be used for the gas injection into the center of the EBIS drift tube system to minimize depolarization and increase ionization efficiency. The second "injector" EBIS section allows using differential pumping between the "gas injector" and the main EBIS. This is especially beneficial for gas species production (including the 3He gas). An isolation valve between the two EBIS sections will simplify the 3He polarizing apparatus maintenance. The ionization in the EBIS is produced in a 5.0 T magnetic field, which preserves the nuclear 3He polarization while in the intermediate single-charged 3He<sup>+</sup> state. The

**Fig. 10.6** Schematic diagram of the extended EBIS. The polarized 3He gas is injected into the drift tube of the new "injector" EBIS part

number of ions is limited to the maximum charge, which can be confined in the EBIS. From experiments with Au<sup>32</sup> ion production, one expects more than 2.0×10<sup>11</sup> 3He2<sup>+</sup> ions/pulse to be produced and extracted for the subsequent acceleration and the injection in the RHIC. After the 3He2<sup>+</sup> beam acceleration to the energy 6 MeV/nucleon the absolute nuclear polarimeter based 3He-4He collisions will be used for the polarization measurements.

The high 3He nuclear polarization more than 80% was achieved by the metastability-exchange technique in the sealed glass cell in the high 2.0–4.0 T magnetic field [20]. In these measurements, the 3He gas at 1.0–3.0torr pressure was contained in the glass cell and the weak RF discharge was introduced to populate the meta-stable states. Meta-stable atoms in the 23S1 state was polarized by optical pumping with circularly polarized (23S1 - 23P0) 1083 nm laser light. Any contamination in the helium gas cell (hydrogen, water vapor etc.) reduces the 3He polarization due to meta-stable states quenching. In the polarized source, the optically pumped cell must be connected to the valve for gas injection to the drift tube and the line for the gas refill. To eliminate the contaminations and maintain the necessary gas purity we developed the system for 3He gas purification and filling based on the cryo-pump, which pumps all gases except for helium. We installed inside the conventional CTI-8 cryo-pump the additional cold vessel (attached to the cold head of the cryo-pump) filled with charcoal granules. It was connected to the 3He filling system by the thin wall tube. At a temperature of 46 K the pump continuously absorbing and reducing partial pressures of hydrogen, water, hydrocarbons, and argon to the level below 10−<sup>7</sup> torr. This pump absorbs also quite a significant amount of 3He gas (of about 100 sccm). The absorbed gas is released by the pump vessel heating. This provides gas storage and supply for 3He-cell operation at the optimal pressure value. The optically pumped 3He glass cell was attached to the gas filling system with a 200 cm long stainless tube. The cell and filling system were mounted on a movable support and inserted inside superconducting solenoid. To prevent 3He atoms depolarization due to travel through the solenoid gradient field we installed an additional isolation valve close to

the cell in the homogeneous field region. We use a remotely controlled (pneumatic) pumping-filling valve between the filling system and glass cell (see Fig. 10.7).

For the polarization measurements, we used the technique of the probe laser absorption [21]. The best results on optical pumping of 3He gas in the "open" cell were 73% with the closed isolation valve and 20% with the open isolation valve at 3.0 torr pressure. We have studied a new EBIS drift-tube configuration to increase the gas efficiency (minimize amount of injected 3He gas for the EBIS trap saturation). The 3He gas will be injected into the small diameter (10–20 mm ID) drift tube by the pulsed valve. The estimations show that a very small amount of 3He gas of about (5–10) <sup>×</sup>10<sup>12</sup> atoms will be required to be injected into the drift tube for 50% EBIS trap neutralization. We are developing the pulsed valve for the 3He-gas injection into the EBIS drift tube, which operates in the 2.0–5.0 T solenoid field. In this valve, the pulsed current of 10–20 A passes through the flexible springing plate (made of phosphorus bronze with a thickness of 0.12 mm). The sealing silicon circular pad (5 mm in diameter 1.0 mm thick) was attached to the plate. The induced Lorentz (Laplace) force: F = eL[I × B] = 2-5 N (for L=5 cm long plate) bends the plate and opens the small (0.1 mm in diameter) hole for the gas injection into the drift-tube. The valve prototype was tested in the 2.0 T solenoid field. The gas flow as low as 2×10<sup>12</sup> atoms /pulse was measured at 12 A current through the plate. The valve was also operated with the four consecutive pulses 4 ms apart, producing up to 10<sup>13</sup> atoms/per cycle. This might be an optimal mode for the gas injection distributed over 20 ms for the effective ionization by the EBIS electron beam, while limiting the injection gas cell pressure to <sup>≈</sup> <sup>10</sup>−<sup>6</sup> mbar. After 3He2<sup>+</sup> acceleration to a few MeV/nucleon He-D or He-Carbon collisions can be used for polarization measurements. The Lamb-shift polarimeter at the source energy of 10- 20 keV can be used in the feasibility studies (similar to the OPPIS polarimeter). In this technique 3He2<sup>+</sup> ions are partially converted to He<sup>+</sup> (2S)-metastable ions in the alkali vapor cell. Then the hyperfine sublevel populations can be analyzed in the spin-filter device to extract the primary 3He2<sup>+</sup> nuclear polarization. A study of limitation on the maximum attainable nuclear polarization in the metastability exchange technique (at the very low polarized 3He gas consumption rate) will be required to define the maximum attainable polarization. Possible depolarization effects during polarized 3He gas injection to existing EBIS prototype and multi-step ionization process should be also studied. The expected 3He2<sup>+</sup> ion beam intensity is <sup>≈</sup>2×10<sup>11</sup> ions/pulse with polarization <sup>≥</sup> 70%.

# **10.9 Summary**

Polarization studies with polarized ion beams at new and existing accelerators and colliders will require high-intensity, high polarization proton, deuteron and 3He2<sup>+</sup> ion beams. State-of-the-art atomic beam sources with resonant plasma ionizer and optically pumped polarized proton sources produce sufficient beam intensity (of a few mA H− ion beam) for charging the high-energy accelerators to full capacity (for colliders the intensity is limited by the beam-beam interaction). The proton polarization of about 90% has been achieved for the high intensity beams. The further increase to over 10 mA pulsed beam intensity has also been demonstrated and will be used at future Electron Ion Colliders. The polarized 3He2<sup>+</sup> ion source based on EBIS injector is under development at BNL for future EIC collider. The extended EBIS operation for the Au<sup>32</sup> ion beam production is planned for the Run-2023. The next step will be integration of polarizing 3He apparatus. The development of the 3He polarizing apparatuses, the spin-rotator, and the nuclear polarimeter at the 3He2<sup>+</sup> ion beam energy 6.0 MeV (in the high-energy beam transport line after the EBIS drift-tube Linac) is under development.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 11 Polarized Electron Sources**

261

**Joe Grames and Matt Poelker**

**Abstract** Highly spin polarized electron beams produced from GaAs photocathodes within DC high voltage photoguns have been critical to many accelerator-based nuclear and particle physics experiments. This chapter describes polarized photoemission from GaAs, the main requirements for constructing a DC high voltage electron source, and techniques to control and measure the polarization of the electron beam.

# **11.1 Introduction**

Many accelerator-based nuclear and particle physics experiments require a spinpolarized electron beam [1]. This describes a beam where the electrons within each accelerated bunch have their spin axes aligned in a preferential direction. Electron spin can be thought of as another "tool" in the physicist's tool bag, one that enables enhanced study of nuclear structure, the dynamics of strong interactions, electroweak nuclear physics including parity-violation, physics beyond the Standard Model and more [2]. Electron beams at accelerator storage rings "self-polarize" via Sokolov-Ternov spin-flip radiation, however at other types of accelerators a direct source of polarized electrons is required.

https://doi.org/10.1007/978-3-031-16715-7\_11

This manuscript has been authored in part by Jefferson Science Associates, LLC under Contract No. DE-AC0506OR23177 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the work for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this work, or allow others to do so, for United States Government purposes.

J. Grames (-) · M. Poelker

Electron Gun Group, Thomas Jefferson National Accelerator Facility, Newport News, VA, USA e-mail: grames@jlab.org; poelker@jlab.org

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection,

The first polarized electron source for an accelerator, based on photo-ionization of state selected 6Li atoms, was developed at Yale University in the early 1970s for use at the Stanford Linear Accelerator (SLAC) [3]. Somewhat later, a polarized electron source based on the Fano effect in Rb was developed for the Bonn synchrotron [4]. Other polarized sources were developed or proposed during the 1970s, including an improved version of the Li photo-ionization source [5], a source based on the chemi-ionization of metastable He atoms [6], and sources using the Fano effect in Cs [7]. Despite some technical demonstrations, none of these latter sources were ever developed to the point of being operational at accelerators. Following the 1974 demonstration of polarized photoemission from GaAs [8] at low voltage, a high voltage source was constructed at SLAC [9] to conduct the seminal parity violation experiment E122 [10] that verified predictions by Wienberg and Salam and thereby helped to establish the Standard Model of electro-weak physics. Since then, DC high voltage polarized electron sources based on GaAs photocathodes were developed and operated at a number of laboratories, including Nagoya University [11], the Mainz Microtron [12, 13], the MIT-Bates Laboratory [14], NIKHEF [15], Bonn University [16], and CEBAF/Jefferson Lab [17].

There are four basic requirements for constructing a DC high voltage spinpolarized electron source using GaAs photocathodes: (1) atomically clean GaAs photocathode material, (2) an appropriate high voltage cathode/anode accelerating structure free of field emission, (3) ultrahigh vacuum, and (4) a suitable drive laser. Proper attention paid to these subjects will enable the reader to build a good spin-polarized electron source where "good" describes a source that is capable of delivering highly polarized beam at the desired current, for long periods of time.

# **11.2 GaAs: A Source of Polarized Electrons**

GaAs is a direct-transition III-V semiconductor with zincblende crystal structure [18, 19]. It can absorb laser light across the broad visible spectrum but only illumination with near-IR wavelengths provides polarized photoemission. This can be understood by looking at the energy level diagram of GaAs in Fig. 11.1 with both detailed [18, 19] and simplified representations [20] of the band structure, as described in the figure caption. Electron spin-orbit coupling splits the P1*/*<sup>2</sup> and P3*/*<sup>2</sup> energy levels of the valence band into two states separated by 0.34 eV, which is large enough to avoid optical pumping from the lower energy P1*/*<sup>2</sup> state. Polarized photoemission takes advantage of the quantum mechanical selection rules, noting that for circularly polarized laser light, conservation of angular momentum requires an electron's spin-angular momentum quantum number to change by one unit, mj = ±1. Furthermore, some transitions are more favorable than others as indicated by the transition probabilities in Fig. 11.1. So by using circularly polarized laser light with near-bandgap energy, the conduction band can be preferentially populated with a particular spin state.

**Fig. 11.1** Energy level diagrams of GaAs: (**a**) detailed bandstructure of GaAs [19], (**b**) "closeup" view near valance band maxima/conduction band minima, and (**c**) simplified view showing individual spin-angular momentum states and transition probabilities, circled [20]

Polarization is defined as

$$P = \frac{N^{\uparrow} - N^{\downarrow}}{N^{\uparrow} + N^{\downarrow}} \,, \tag{11.1}$$

where N refers to the number of electrons in the conduction band of each spin state, "up" or "down". For bulk GaAs, the theoretical maximum polarization is 50%, corresponding to three electrons of the desired spin state and one electron with opposite spin. In practice however, maximum polarization from bulk is typically 35%, owing to various proposed depolarization mechanisms such as the Bir-Aronov-Pikus process [21], the D'Yankonov-Perel process [22], the Elliot-Yafet process [23], and radiation trapping [24]. A less academic description simply attributes depolarization to imperfections within the photocathode material that result in reduced diffusion length which serves to prevent electrons from efficiently reaching the surface of the photocathode, thereby providing more opportunity for the electrons to depolarize on the way out.

The figure of merit of most polarized electron beam experiments scales as *P*2*I* , where *I* refers to beam current. As such, there is great incentive to increase beam polarization, particularly for experiments that cannot accommodate high current, for example, due to concern over target window failure or target boiling. Significant breakthroughs in polarized electron source development occurred in the 1990s when Nakanishi et al. [25] developed a means to eliminate the heavy-hole/lighthole degeneracy at the valence band maxima by introducing an axial strain within the GaAs crystal. This was accomplished by growing GaAs atop GaAsP which introduces a strain due to the lattice mismatch between the GaAs and GaAsP crystal structures. Polarization as high as ∼75% can be obtained from such a structure however photocathode yield, or quantum efficiency QE, is typically very low, just 0.1% (more on QE below). The GaAs surface layer is typically 50 to 100 nm thick. Thicker layers can provide higher QE, but this causes the strain to relax and polarization is reduced.

Today's state-of-the-art high polarization photocathode is the GaAs/GaAsP strained-superlattice structure [26] which consists of a very thin GaAs surface layer (∼5 nm) grown atop 10–20 pairs of thin, alternating layers of GaAsP and GaAs. By growing very thin GaAs layers, the strain can be maintained which improves polarization and electrons in sub-surface layers efficiently tunnel through the GaAsP layers. And by using many thin layers of GaAs/GaAsP, the QE can be considerably higher than obtained from a single (thicker) layer of strained GaAs. The net result is polarization ∼85% and QE ∼1%. Schematic representations of each high polarization photocathode are shown in Fig. 11.2 with plots of polarization versus laser wavelength [27].

Both of the photocathode structures described above were developed [28, 29] thanks to collaborative R&D programs initiated by SLAC via the DOE small business initiative research program. Similar photocathodes have been manufactured by university groups in Japan and Russia [30], with different stoichiometric combinations of Ga, As and P as well as In and Al, that serve to modify the band-gap and correspondingly, the appropriate drive laser wavelength.

The emission of electrons from GaAs is often described as a three-step process [31] involving absorption of light, diffusion of electrons to the surface of the photocathode, and emission of the electrons into the gun vacuum chamber. As described above, absorption of circularly polarized light with near-band gap energy preferentially populates the conduction band with spin polarized electrons. GaAs is a strong absorber with most of the light absorbed within a few hundred nanometers. These electrons diffuse in all directions and those that move toward the surface encounter a potential barrier known as the electron affinity (Fig. 11.3a). A requirement for efficient photoemission is that the GaAs be p-doped [8], which serves to lower the Fermi level throughout the material. The p-doping also serves to lower the conduction band at the surface of the photocathode, which in turn lowers the electron affinity (Fig. 11.3b). Still, no significant photoemission is obtained until the potential barrier is reduced further and this is accomplished by adding a mono-

**Fig. 11.2** Two types of GaAs photocathode structures that provide high polarization: (left) strained-superlattice GaAs and, (right) strained-layer GaAs

layer of cesium and oxidant (Fig. 11.3c). The process of adding cesium and an oxidant to the photocathode is called "activation".

All of this sounds relatively simple, however in practice, obtaining the expected amount of photoemission can be difficult because the GaAs surface must be extremely clean and free of contamination on an atomic scale. Unfortunately, there are a number of steps that must be taken to insert a GaAs photocathode into a DC high voltage photogun which means there are many opportunities to contaminate the wafer. And once the photocathode is installed within the photogun, it must remain clean, which means the photogun must function properly while delivering beam. Mostly this means the static vacuum inside the photogun must be extremely low

**Fig. 11.3** Energy level diagram of GaAs at the vacuum interface. (**a**) Undoped GaAs, (**b**) p-doped GaAs, (**c**) with Cs and oxidant applied to the surface

and must remain low while delivering beam. The sections below describe typical photoguns and the steps required to install clean photocathodes.

# **11.3 Description of Typical Polarized Photogun**

DC high voltage GaAs-based polarized photoguns can be categorized as vent/bake or load-locked. In general, vent/bake guns are considered easier to build but require frequent maintenance whereas load locked photoguns offer more accelerator uptime, at least once reliable sample manipulation has been demonstrated. A brief description of each type is presented below.

# *11.3.1 Vent/Bake Photoguns*

Vent/bake photoguns must be vented to atmospheric pressure each time the photocathode is replaced, and then baked for an extended period of time to recover the necessary vacuum level (more below). A typical vent/bake photogun is shown in Fig. 11.4 and was successfully used at CEBAF/Jefferson Lab for over ten years [17]. All of the features that are needed to activate the photocathode to NEA, bias the photocathode at high voltage, and generate high-quality beam in an ultrahigh vacuum environment are housed in a common vacuum chamber.

The photocathode is attached to the end of a long stalk extending into the gun vacuum chamber through the bore of the large cylindrical insulator. Prior to

**Fig. 11.4** The CEBAF/Jefferson Lab vent/bake −100 kV DC high voltage spin polarized GaAs photogun. It rests in the horizontal plane with the drive laser light introduced through a vacuum window to the right (not shown)

activating the photocathode to NEA, the photocathode must be heated to ∼500 ◦C to liberate loosely bound adsorbed gas. Higher temperatures can "boil off" some of the surface contamination (oxides, in particular) but not carbon. Temperature *>*630 ◦C must be avoided as this causes the GaAs to decompose due to preferential evaporation of arsenic. To heat the photocathode, the stalk is retracted ∼5 cm to avoid heating other parts of the gun and a resistive heater is inserted into the atmospheric side of the stalk in close mechanical contact. When the heat treatment has concluded, the photocathode is allowed to cool to room temperature and then moved back into position within the cathode electrode for activation and beam generation. The cathode electrode has a 25 degree focusing angle and the anode is approximately 6 cm away. This geometry provides optimized transport for CEBAF beam with a maximum field gradient of ∼5 MV/m when the cathode electrode is biased at −100 kV. Note that the cathode/anode geometry of each photogun depends heavily on the accelerator's beam specifications (e.g., bunch charge) and is typically determined by performing computer simulations (i.e., field mapping and particle tracking).

Non-evaporable getter (NEG) modules surround the cathode/anode gap providing thousands of liters/sec pumping for hydrogen. A small diode ion pump (not shown) is used to pump inert gases such as helium and methane that are not efficiently pumped by NEGs. The photocathode is activated to NEA using cesium and fluorine (or oxygen) sources located downstream of the anode. During activation, the drive laser can be directed onto the photocathode, or a white light source can illuminate the photocathode from the side using a metallic mirror inside the vacuum chamber. The two chemicals, Cs and NF3, are applied to the photocathode and metered while monitoring photocurrent, which varies in a "yoyo" manner with photocurrent begin successively increased and decreased, although other groups follow different but acceptable protocols. The yo-yo activation process is described below. The chemical application is terminated once photocurrent ceases to increase appreciably, typically after ten yo-yo's, with the net result corresponding to approximately one monolayer of chemical deposition. Cesium originates from a alkali-metal dispenser from SAES Getters and is controlled by applying electrical current through a vacuum feedthrough. The NH3 is applied using a vacuum leak valve.

As mentioned above, the entire gun structure must be baked each time the photocathode is replaced. Bakeout temperature is typically ∼250 ◦C and bakeout duration is ∼30 hours, although the bakeout can last longer if there is significant water vapor inside the vacuum chamber, for example due to extensive vacuum chamber modification. High temperature bakeouts necessitate some precautions. For example, bare copper gaskets will oxidize during a bakeout. This is problematic because the oxide layer can "flake off" when flanges are disassembled which sometimes leads to a flange leak during a subsequent bakeout. To prevent this from happening, copper gaskets should be nickel-flashed and silver-plated because these gaskets will not oxidize. Silver-plated bolts are also recommended for the same reason, they do not oxidize. This ensures that nuts and bolts turn freely post-bakeout when gun disassembly is warranted. The NEG pumps can be electrically activated or passively activated to about 60% of their rated pump speed during the bakeout.

Besides the burden of vacuum chamber bakeouts, which take days to complete, the most significant drawback of the vent/bake photogun design is the inadvertent application of cesium on the cathode electrode, which eventually leads to catastrophic field emission, necessitating cathode electrode cleaning or replacement. The design shown in Fig. 11.4 provides about seven full photocathode activations before succumbing to field emission. Other gun designs at other laboratories faired better or worse and in hindsight, results likely depended on the size of the anode hole and location of the cesium dispenser relative to the anode, which define the solid angle of cesium deposition at the photocathode and cathode electrode. Gun designs with small solid angle faired better than those that introduced more cesium on the cathode electrode.

# *11.3.2 Load/Lock Photoguns*

Load-locked photoguns are comprised of multiple vacuum chambers separated by valves, with vacuum improving from one chamber to the next and the best vacuum obtained inside the gun high voltage chamber. Reiterating on comments above, one of the benefits of a load-lock design is that new photocathode samples can be installed without lengthy vacuum bake-outs of the entire gun. Another benefit of the load lock approach is that cesium is not inadvertently applied to the cathode electrode since activation takes place inside another chamber. In this way, the cathode electrode is maintained pristine, and it exhibits no field emission when

**Fig. 11.5** (Top) Plan view shows the complete gun assembly with four vacuum chambers: gun High Voltage Chamber (large bore ceramic insulator design), Preparation Chamber, intermediary chamber and "Suitcase". (Bottom) Side view shows some of the components inside the preparation chamber including a heater that also serves to move the puck toward a mask used to selectively activate only the center portion of the photocathode

biased at high voltage. Historically, most gun groups move to a load lock design for this reason to eliminate field emission.

The CEBAF/Jefferson Lab load lock gun is shown in Fig. 11.5 [32]. It consists of four vacuum chambers: the high voltage chamber, the photocathode preparation chamber, a "suitcase"'chamber used for replacing photocathode samples, and an intermediary chamber that must be evacuated and baked each time the suitcase is attached. The suitcase is normally detached from the photogun and stored elsewhere. This approach helps to reduce the overall footprint of the photogun when in operation. Numerous alternative designs are used at laboratories worldwide [12, 13, 15, 16, 33, 34]. Desirable features incorporated into most designs include the ability to store multiple photocathode samples, to reliably transport a sample from one chamber to the next without dropping, and rapid heating and cooling of samples for fast turn-around at activation.

The high voltage chamber is similar to that of the vent/bake photogun described above, but without the components associated with photocathode activation. NEG pump modules surround the cathode/anode gap and a small ion pump is used to pump inert gas species.

Key features of the preparation chamber include: storage for up to four pucks (each puck supports one photocathode), a mask for selective activation of a portion of the photocathode surface, puck heating to at least 600 ◦C and good vacuum obtained using NEG and ion pumps. Photocathode activation takes place inside the preparation chamber using cesium and NF3 similar to those described for the vent/bake photogun. The preparation chamber has four magnetically-coupled sample manipulators: one long manipulator with translation and rotation capability for moving pucks into or out of the gun high voltage chamber cathode electrode, one short manipulator with translation and rotation capability for moving pucks from/onto the heater assembly as well as to transferring pucks to/from the long manipulator, and two short manipulators with translation capability that serve to hold pucks with additional photocathode samples. Care must be taken during the initial commissioning bake of the preparation chamber—the magnetic manipulators can develop excessive friction that limits functionality when heated above ∼200 ◦C. Each magnetic manipulator is attached to a bellows assembly with adjustment screws for proper alignment to the electrode, heater and other manipulators. Pumping inside the prep chamber was provided by 40 L/s ion pump and 1.5 WP-1250 NEG modules from SAES Getters with support rods removed, and coiled into the bottom of the vacuum chamber. Pressure inside the preparation chamber is <sup>∼</sup>1×10−<sup>10</sup> Torr, which is adequate for making photocathode with high QE, however improved vacuum would provide a longer dark lifetime.

# **11.4 Operating a DC High Voltage Spin-Polarized GaAs Photogun**

Photocathode lifetime of modern DC high voltage GaAs photoguns is limited primarily by ion bombardment [35], the mechanism where residual gas is ionized by the extracted electron beam and transported backward to the photocathode where the ions adversely affect photocathode QE. Consequently, the best GaAs photogun lifetime is obtained by minimizing ion bombardment and this means operating the photogun with exceptionally good vacuum.

# *11.4.1 Ion Bombardment*

Exactly how the ions degrade QE is the subject of much speculation. While it has been determined that ions with sufficient kinetic energy penetrate the surface of the photocathode [36], it is not known what these ions do to the photocathode. They might damage the GaAs crystal structure or serve as trapped interstitial defects that reduce the electron diffusion length or serve as unwanted dopant species, adversely altering the photocathode energy band structure. Impinging ions might also sputter away the chemicals used to reduce the work function at the surface of the photocathode. Predicting which ions are the most problematic (gas species and energy) awaits a detailed modeling study that considers many parameters including: relevant ion species with appropriate ionization cross sections, accurate trajectories of both ions and electrons, sputtering yield of alkali (cesium) and oxidant (fluorine) used to create the negative electron affinity (NEA) condition at the photocathode surface required for photoemission, and stopping depths of ions within the photocathode. Parameters such as optical absorption length, electron diffusion length and active layer thickness are likely to be important factors, too.

The ions produced by the electron beam are delivered to the photocathode in a manner determined by the electrostatic field of the cathode/anode structure. When the drive laser beam is positioned at the center of the photocathode, all of the ions are delivered to the same location. When the laser beam is moved radially outward, ions are produced at the location of the laser beam and along a "trench" connecting the point of origin to the electrostatic center of the photocathode. Furthermore, ions produced downstream from the anode can be delivered to the photocathode and these ions hit the electrostatic center. A typical "QE scan" of a GaAs photocathode is shown in Fig. 11.6 illustrating QE reduction due to ion bombardment.

The best strategy for minimizing QE decay associated with ion back bombardment is to operate the photogun under excellent vacuum. This includes static vacuum (no beam) and dynamic vacuum (while delivering beam). A small cathode/anode gap is desired, to limit the number of ions created. However, small gaps produce large gradient, and large gradient enhances field emission from the cathode electrode which can significantly degrade gun performance via chemical poisoning of the photocathode surface and enhanced ion bombardment. A comprehensive study [32] showed that the best operating lifetime can be obtained by operating with a laser beam positioned away from the electrostatic center, and with an active area that minimizes the creation of "halo" beam that might not be efficiently transported away from the photogun. Most recently experiments [37] were performed to quantify the improvement in photocathode charge lifetime by biasing the photogun anode with a positive voltage, which repelsions generated downstream of the anode, improving the charge lifetime by almost a factor of two when the anode was biased compared to the usual grounded configuration.

**Fig. 11.6** QE measured across the surface of a photocathode that has been damaged by ions. The electron beam was extracted from three different radial locations. Note QE "trenches" that terminate at a common "electrostatic center"

# *11.4.2 Vacuum*

The simple equation below provides remarkably useful insight toward appreciating the vacuum aspects of the photogun:

$$P\_{ult} = \frac{GasLoad}{PumpSpeed} \,, \tag{11.2}$$

where P*ult* is the ultimate pressure inside the gun. Obviously, it is beneficial to make the gas load inside the photogun small and the pump speed large.

To ensure a small gas load inside the photogun, a number of steps must be taken. First, proper UHV techniques must be practiced [38]. This includes constructing the photogun free of contamination. Manufactured parts are typically fabricated without oil or silicone lubricants and all components are cleaned in an ultrasonic bath of alkaline cleaner followed by acetone and hot de-ionized water. It is also very important to ensure that there are no virtual leaks inside the gun (i.e., small spaces with trapped gas). For this reason, internal components are assembled with vented, silver-plated stainless steel screws.

After the photogun has been constructed, it must be evacuated and baked to remove water vapor. Typically, this is accomplished by baking the gun at 250 ◦C for 30 hours or longer. To assist this process, all CEBAF photoguns are built on tables with an insulating top and large enough to accommodate oven panels that completely surround the gun. For many years heated air was directed into the enclosure using a 4 kW commercial heater system with flowing hot air to assure that the gun structure is heated uniformly without developing significant temperature differentials, however, an occasional failed heater element would lead to cooling and a possible leak due to a thermal shock. Today, very reliable commercial heater bars are routinely used, placed at the bottom of the bakeout oven enclosure, they have sufficient output to raise the oven temperature and if failed they provide for a slow cooling rate of a well insulated enclosure. As mentioned previously, nickel-flashed and silver-plated gaskets are recommended, to avoid oxidation that can lead to flange leaks. Silver-plated high-strength stainless steel bolts and stainless steel nuts can be easily disassembled post-bake. And belleville washers are used on flanges larger than 70 mm to assure reliable sealing during the expansion and contraction cycles of high temperature bakeouts.

When constructed properly, the gas load within the baked photogun originates from hydrogen outgassing from the walls and internal components of the photogun. The typical outgassing rate of 304 stainless steel is 1×10−<sup>12</sup> Torr-L/sec-cm<sup>2</sup> and with the vacuum pumping from NEGs and ion pump described below, it is not difficult to obtain pressure in the low 10−<sup>12</sup> Torr range. Hotter bakeouts [38] provide lower outgassing rates and proportionally lower pressure. High current applications benefit from the extra effort to reduce the outgassing rate of photogun components.

Ideally, when the valve to the beamline is opened, the gun vacuum should not degrade appreciably. This means the beamline must be baked and it is a good idea to incorporate a differential pump station near the gun, to isolate gun vacuum from the rest of the accelerator, if space allows it.

As for pumping, all modern DC high voltage spin-polarized GaAs photoguns rely on NEG pumps and a small diode ion pump for inert gases not pumped by NEGs, like He and methane. NEG pumps provide thousands of liters/s pump speed for hydrogen gas, the dominant gas species inside a UHV chamber. NEG pumps are commercial items purchased from SAES Getters and the pumps that rely on ST707 material can be activated at relatively low temperature (∼400 ◦C). Typically, a photogun design incorporates many NEG modules connected in series and electrically isolated inside the gun. The pumps are activated (i.e., heated) by passing current through them.

# **11.5 Photocathode Preparation**

As mentioned previously, there are a number of steps that must be taken to insert a GaAs photocathode into a DC high voltage photogun, which means there are many opportunities to contaminate the wafer. These steps include:


The exact details of these steps vary somewhat depending on the specific photogun design, for example whether a photogun is vented and baked each time the photocathode is replaced, or installed via a load-locked vacuum apparatus where the photocathode is mounted to a small support structure and moved between different vacuum chambers. The text below describes features common to both gun designs and highlights some of the relevant differences.

# *11.5.1 Cutting GaAs to Shape and Size*

GaAs material is typically sold in large circular discs, ∼600 µm thick and 50– 75 mm diameter, with a flat at one edge to indicate the direction of the cleave plane. This large wafer must be cut into smaller samples for installation into photoguns. Originally, at CEBAF/Jefferson Lab, samples were cut from large wafers using a circular-shaped cutting jig and diamond-paste slurry. The large wafer was sandwiched between glass slides using an acetone-soluble adhesive in an attempt to protect the surface of the photocathode during cutting. This process was time consuming and invariably introduced a significant amount of contamination on the surface of the photocathode, which needed to be removed using strong acids/bases or via hydrogen cleaning. Years ago, this cutting technique was replaced with a far simpler cleaving technique. A diamond-tip scribe is now used to cleave square samples from large wafers. Aside from the diamond-tip scribe, nothing touches the surface of the photocathode material during cleaving and as a result, the photocathode surface is not contaminated.

# *11.5.2 Anodizing Edge to Limit QE*

It is very important to eliminate unwanted and inadvertent photoemission from the edge of the photocathode—photoemission that does not get properly transported away from the gun. Photoemission from the edge of the photocathode follows extreme trajectories, striking the vacuum chamber wall downstream of the gun, and even hitting the anode plate. This degrades vacuum in the gun hastening photocathode QE decay. One way to eliminate photoemission from the edge, is to anodize edge of the photocathode in an electrolytic bath.

A fixture was devised that holds the photocathode sandwiched between two Viton o-rings. One o-ring prevents electrolytic fluid from contacting the center portion of the front face, and the other o-ring merely provides a surface to securely hold the wafer without breaking it. Clean distilled water with a few drops of phosphoric acid provides adequate pH for anodizing. In just a few seconds, a thick oxide layer is formed on the photocathode edge, that provides no measurable photoemission, and does not evaporate during bakeouts or photocathode heating. For load locked guns, an activation mask can be used to selectively activate only the center portion of the photocathode. This mask eliminates the anodizing step and saves a considerable amount of time.

# *11.5.3 Mounting a Photocathode*

Next, the small photocathode samples are indium soldered to a molybdenum support structure (i.e., the stalk or puck), at ∼200 ◦C, inside a nitrogen-filled glove box. Molybdenum is a good material for supporting the photocathode sample because it has a small coefficient of thermal expansion and is UHV compatible. The indium provides mechanical stability and good heat conduction (the GaAs must be heated to ∼500 ◦C to remove weakly bound gas before activation). A tantalum retaining ring is then placed over the GaAs wafer and crimped in place, to ensure that the GaAs wafer is never inadvertently dislodged from the support structure.

# *11.5.4 Heating and Activating a Photocathode*

The GaAs wafer, mounted to its support structure, is then loaded into the gun vacuum chamber using a nitrogen-filled glove bag. The gun is pumped down using a clean, oil-free rough pump. Once the pressure has dropped sufficiently low as to energize the ion pump on the gun vacuum chamber, the valve to the rough pump is closed. The entire photogun chamber is then baked, as described above. It is important that the GaAs photocathode stay clean during the bakeout. This is accomplished by minimizing the time it takes to vent and pump down the vacuum chamber, and by venting the vacuum chamber with clean, dry nitrogen gas pressurized to assure minimal back diffusion during photocathode exchange. When these precautions are taken, pump down from atmospheric pressure is rapid the pressure typically falls below 1×10−<sup>8</sup> Torr within 20 minutes after starting pumping. As further testament to good vacuum practice, the pressure rises no higher than <sup>∼</sup>5×10−<sup>8</sup> Torr during bakeout.

Once the bakeout is complete, the photocathode can be activated to NEA. This is accomplished by first heating the photocathode to ∼500 ◦C to liberate loosely


**Table 11.1** Typical QE and polarization for common GaAs photocathodes

bound adsorbed gas from the surface of the photocathode. Two hours at temperature is sufficient. Once the photocathode has cooled to ∼30 ◦C, activation begins with successive application of cesium and NF3 (or oxygen), beginning with cesium. During activation the cathode is biased at ∼ −200 V and illuminated with light. On the initial cesium exposure the photoemission current reaches a maximum and then decreases. A typical approach (called the "yo-yo" process) allows the photocurrent to decrease to about half of its maximum value before stopping the cesium exposure. On subsequent exposure to NF3, the photocurrent rapidly increases to a new maximum, saturates and then slowly decreases. Further exposure to cesium quickly produces a rapid decrease in the photocurrent. Again, the photocurrent falls to about half followed by another nitrogen trifluoride exposure. Typically, ten cycles of Cs-NF3 are required to reach the final quantum efficiency.

To assess how well the photocathode installation was performed, it is customary to evaluate QE, which is defined as the number of photo-emitted electrons per number of incident photons. It can be written in terms of easily measured quantities:

$$QE = \frac{N\_{electrons}}{N\_{photons}} = 124 \frac{i}{\lambda P} \,, \tag{11.3}$$

where *i* is photocurrent in *μ*A, *λ* is laser wavelength in nm, and *P* is incident laser power in mW. Typical QE values from clean photocathode material illuminated with near-band gap light appropriate for high polarization, are listed in Table 11.1.

# *11.5.5 Hydrogen Cleaning GaAs*

Edge-anodizing is a step that most often introduces contaminants onto the surface of the photocathode. Baking of the photocathode within the gun at high pressure (for example, due to lots of water within the gun) is another opportunity for contamination. There are many recipes for cleaning semiconductor surfaces with wet chemical solutions of strong acids and/or bases, however, experience at Jefferson Lab with wet chemical cleaning techniques was mixed. Moreover, wet chemical cleaning techniques involve significant removal of the surface layer, a situation that is not acceptable when using high polarization photocathodes. So an alternative cleaning procedure using atomic hydrogen was adopted. Atomic hydrogen exposure has been shown to remove surface contaminants such as carbon and oxygen from a wide variety of semiconductors [39–43] . Furthermore, as noted in [44] , hydrogen

**Fig. 11.7** The RF-dissociator, atomic hydrogen cleaning apparatus used at CEBAF/Jefferson Lab

atoms passivate the dangling bonds at the GaAs surface, leaving a relatively inert surface, ideal for gun bakeouts.

RF-dissociators and thermal crackers are common sources of atomic hydrogen. At CEBAF/Jefferson Lab, the RF-dissociator approach is used although there is some concern that this method roughens the photocathode surface. Molecular hydrogen from a small research-grade bottle is fed through a pyrex cylinder at about 20 mTorr (Fig. 11.7). A 12 turn coil surrounds the pyrex tube and a plasma is formed when the applied RF (∼50 W) is resonant with the circuit. Atomic hydrogen exits the chamber through a ∼1 mm diameter hole and is guided to the photocathode sample about 15 cm away by an aluminum tube (aluminum has a low recombination rate). The photocathode sample is maintained at 300◦C during hydrogen cleaning [41, 42]. A small turbo-molecular pump and an ion pump maintain pressure near the photocathode sample at <sup>∼</sup>10−<sup>5</sup> mTorr during cleaning, to provide a long mean free path for the atoms and ensure the atoms hit the photocathode before recombining into molecules. Monte Carlo simulations predict that ∼2.5% of the total atom flux reaches the photocathode. Under these conditions the atom flux at the cathode is estimated to be <sup>∼</sup>10<sup>17</sup> atoms/cm2-sec, assuming 50% dissociation [45].

After hydrogen cleaning, the stalk and photocathode are installed within the photogun using a nitrogen-filled glove bag. Hydrogen cleaning also provides an added benefit, serving to produce a chemically inert surface that helps to keep the photocathode clean during photogun bakeout. Hydrogen cleaning has also been adopted on load locked gun systems, for in situ cleaning.

# **11.6 Drive Lasers for Polarized Beam**

A DC laser light source can be used to make an electron beam at an accelerator but something must be done to create the appropriate RF-time structure necessary for acceleration. Typically this means using RF bunching cavities or RF choppers but bunching introduces energy spread and chopping is very inefficient, with a significant amount of the beam simply thrown away. At CEBAF, these ill-effects were overcome by implementing synchronous photoinjection, a process whereby RF structure is created directly at the photocathode using an RF-pulsed drive laser. In the 1990s, synchronous photoinjection with a GaAs photocathode had not yet been demonstrated. In fact, some thought it would not be possible, suggesting that GaAs would not respond quickly enough to the short-pulse light [46]. However, this concern proved unwarranted and synchronous photoinjection with GaAs is now widely used at many accelerators [47–49].

Modelocked lasers are often used for synchronous photoinjection but gainswitching [50] is the preferred pulse forming technique employed at CEBAF. Gain-switching is a purely-electrical technique that relies on diode lasers. By simply applying ∼1 W RF sine wave to the diode laser, ∼30 to 50 ps optical pulses can be obtained at repetition rates between 100 to 3000 MHz. This pulse train can be easily locked to the accelerator RF frequency and laser cavity length feedback loops are not required. A gain-switched diode however can only produce a few milliwatts average power and so for most accelerators, a laser amplifier is required to boost power to an acceptable level. At wavelengths between 780 and 850 nm, diode lasers are readily available and single-pass traveling wave tapered stripe diode amplifiers can be used to generate ∼100 mW. For higher power applications, fiber-based laser components from the telecom industry are now the best choice. Light at 1560 nm from a fiber-coupled gain switched seed laser can be sent to a fiber amplifier and then frequency doubled to produce Watts of useful light at 780 nm [51] (Fig. 11.8). Similar fiber-based systems are used to generate high power at 532 nm [49].

**Fig. 11.8** Schematic of the fiber-based laser system with gain-switched diode master oscillator. DFB, distributed feedback Bragg reflector diode laser; ISO, fiber isolator; L, lens; PPLN, periodically poled lithium niobate frequency doubling crystal; DM, dichroic mirror

# **11.7 Spin Manipulation**

Polarized-beam experiments require a specific orientation of the electron spin direction at the target, typically parallel to the direction of beam motion. Moreover, the spin direction must flip sign at some specified frequency. Spin flipping is accomplished by reversing the polarity of voltage applied to an electro-optical element called a Pockels cell, which is located on the drive laser table at the photoinjector. Typically, the polarization direction of the electron beam flips at 30 Hz, and more recently a technique has been developed to flip polarization at a much faster rate up to 1000 Hz [52].

Electrons leave the photocathode with spin direction pointing parallel/antiparallel to the direction of beam motion, depending on the helicity of the laser circular polarization (right or left circular) created by the Pockels cell. But the spin direction precesses in the horizontal plane as the beam passes through the arcs and transport lines to the halls, and this net spin precession must be "cancelled out" by orienting the spin direction at the injector by the opposite amount using a spin manipulator. At CEBAF, a Wien filter is used for spin manipulation [17]. It is a device with static electric and magnetic fields perpendicular to each other and to the velocity of charged particles passing through it, as shown in Fig. 11.9. Unit charged particles with a velocity of *βc* <sup>=</sup> *E/B* are undeflected in passing through the Wien filter, while the spin is rotated in the plane of the electric field. A

**Fig. 11.9** The Wien filter spin manipulator used with CEBAF's second and third polarized electron sources. The magnet is not shown in the cutaway view

window-frame dipole magnet provides the magnetic field. The magnet is terminated at each end with a nickel plate having a 20 mm diameter beam aperture. The full magnet, assembled on the Wien filter vacuum chamber, is carefully mapped with a precision Hall probe. The profile of the electric field plates is calculated, using the code POISSON [53], to produce an electric field profile closely matching the magnetic field profile. The Wien filter is capable of ±110◦ spin rotation at 100 keV. The calibration and performance of this Wien filter is described in Grames et al. [54].

# **11.8 Polarimetry**

After going through the trouble of making a spin-polarized electron beam, one then needs to measure the magnitude of the polarization. Typically, this is done using Mott polarimetry [55] which can accommodate electron beam energies between a few keV and a few MeV. A Mott polarimeter relies on the scattering asymmetry observed when spin-polarized electrons, with spin vector oriented perpendicular to the scattering plane, scatter from the nuclei of an unpolarized target. To make a polarization measurement, a scattering asymmetry is measured using detectors that count the number of electrons that scatter to the right/left (or up/down) as the direction of the electron spin is flipped by changing the helicity of the photogun drive laser light (via the laser-table electro-optic Pockels cell, described above). The measured scattering asymmetry is related to beam polarization, *P*, and the effective Sherman function, *Seff* as given below:

$$A = \frac{N\_r - N\_l}{N\_r + N\_l} = P \times S\_{eff} \,\, . \tag{11.4}$$

The Sherman function, or analyzing power, is a term associated with the physics of the scattering process, and the effective Sherman function describes the same process but modified to account for both single and double elastic scattering into the detector acceptance. The most desirable characteristic of any polarimeter is a large and well-known effective Sherman function however, in practice, this value must be determined by computer simulation and/or detailed experimental measurements, e.g., target thickness extrapolation, or retarding field scans.

The subject of Mott polarimetry is broad enough to be the focus of another book, see e.g. [1, 56]. Suffice to say there are different types of Mott polarimeters that can be loosely categorized according to their electron beam energies: low-voltage retarding field Mott polarimeters, conventional gun-voltage Mott polarimeters and MeV Mott polarimeters. Of these, the MeV Mott polarimeters are the most suited for accelerators; allowing good resolution scintillators and time-of-flight or spectrometer discrimination to isolate the elastically scattered electrons, and lead shielding and veto detectors to suppress the photon background. Plural scattering is significantly reduced and target thickness extrapolation can lead to both precise and accurate( *<*1%) knowledge of the electron beam polarization [57]. For conventional Mott polarimetry at gun voltage (∼100 kV), the effective Sherman function is empirically determined by performing a foil thickness extrapolation to deduce the asymmetry associated with single-scattering events [20]. For retarding field Mott polarimetry [58], a low voltage beam (-200V) is accelerated toward a thick target biased at ∼20 kV. Electrons with a broad energy spectrum arrive at the detectors but the single scattering events can be discerned by biasing the detectors at the photocathode voltage.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 12 Ion Polarimetry**

285

**William Schmidke**

**Abstract** The degree of polarization of the beams must be precisely measured, both to enable development and optimization of the beams, and to normalize the spin dependent effects observed in experiments. Ion beam polarimetry is particularly challenging since the physics processes available for polarimetry are themselves the subject of active physics research. This chapter describes ion polarimetry as implemented at the Relativistic Heavy Ion Collider (RHIC), the only high energy polarized proton collider.

# **12.1 Polarimetry Requirements**

Polarimetry is based on asymmetries measured in scattering of beam particles with target particles. For transverse polarization, spin effects are manifested as an azimuthal asymmetry of scattered particles. This results in an imbalance of particles scattered left and right in the plane perpendicular to the polarization vector. A diagram of such a scattering process is shown in Fig. 12.1.

W. Schmidke (-)

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

Physics, Brookhaven National Laboratory, Upton, NY, USA e-mail: wschmidke@bnl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_12

**Fig. 12.1** Diagram of scattering of a polarized beam particle scattering on an unpolarized target

Polarimetry of transversely polarized ion beams makes use of the Single Spin Asymmetry (SSA), where either the beam or target is polarized and the other unpolarized. If NL and NR are the numbers of particles scattered left and right, respectively, then for a beam or target with polarization P the left/right asymmetry is written as

$$
\epsilon = \frac{N\_R - N\_L}{N\_R + N\_L} = P \cdot A\_N. \tag{12.1}
$$

The proportionality constant AN , referred to as the analyzing power, is the SSA for the process. It is a physics quantity depending on the particles involved, their energies and their scatting angles.

A polarimeter requires detectors sensitive to the azimuthal asymmetry. At minimum detectors must be placed left and right in the scattering plane perpendicular to the polarization vector as shown in Fig. 12.1. A more fine-grained azimuthal spacing of detectors will provide more information, such at the precise direction of the polarization vector.

# *12.1.1 Absolute Polarimetry*

Unlike for electron polarimetry (Chap. 13), the analyzing power AN for ion polarimetry is not known from established physics. In fact, it is the subject of spin physics studies. A procedure independent of AN is required for measuring the absolute value of the polarization.

Such a procedure is possible if the target and beam are available in both spin states, up and down. By averaging over beam spin states the beam is effectively unpolarized, and the asymmetry with respect to target polarization may be measured. Similarly, averaging over target spin states allows measurement of the asymmetry with respect to the beam polarization. This principle is illustrated in Fig. 12.2 for a proton beam and target.

**Fig. 12.2** Left: Polarized proton target with proton beam unpolarized by averaging over spin states. Right: Polarized proton beam with proton target unpolarized by averaging over spin states

In practice the ion beam typically has a mixture of bunches with both spin states; the data collected by the polarimeter can be sorted according to spin state. The target may also be operated in both spin states and the data similarly sorted. Then by averaging over beam spin states the asymmetry with respect to the target spin target is measured, and averaging over of target spin states the asymmetry with respect to the beam spin beam is measured. In terms of target and beam polarizations Ptarget and Pbeam the asymmetries are

$$
\epsilon\_{\text{target}} = P\_{\text{target}} \cdot A\_N, \qquad \epsilon\_{\text{beam}} = P\_{\text{beam}} \cdot A\_N. \tag{12.2}
$$

Furthermore, the target particles are at rest or almost at rest, and the target polarization Ptarget may be measured by conventional laboratory methods. Then from Eq. 12.2:

$$P\_{\text{beam}} = \frac{\epsilon\_{\text{beam}}}{\epsilon\_{\text{target}}} P\_{\text{target}}.\tag{12.3}$$

The absolute beam polarization is thus determined in terms of measured quantities, independent of the analyzing power AN .

# *12.1.2 Beam Details*

Besides the absolute value other aspects of the beam polarization also need to be measured, both for beam optimization and use by experiments. An obvious example is the polarization lifetime, since the degree of beam polarization will inevitably decrease with time:

$$P(t) = P\_{t=0} \ e^{-t/\tau}.\tag{12.4}$$

The lifetime measurement requires several accurate polarimeter measurements throughout the life of a beam.

**Fig. 12.3** Example of Gaussian profiles for beam intensity I (x) and polarization P (x)

Polarization loss in stored beams occurs primarily through development of polarization profiles, with loss at the edges of the 6-dimensional beam bunch phase space. The bunch intensity and polarization may be parameterized by Gaussian distributions. For example, for the transverse position x intensity and polarization distributions are

$$I(\mathbf{x}) = I\_0 \ e^{-\frac{\mathbf{x}^2}{2\sigma\_I^2}}, \qquad P(\mathbf{x}) = P\_0 \ e^{-\frac{\mathbf{x}^2}{2\sigma\_P^2}},\tag{12.5}$$

as illustrated in Fig. 12.3.

The polarimeters are sensitive to convolutions of the intensity and polarization profiles of single beams, and colliding beam experiments are sensitive to the profiles of both beams. The results of such convolutions are conveniently expressed in terms of the profile parameter R [1]:

$$R = \frac{\sigma\_I^2}{\sigma\_P^2}.\tag{12.6}$$

For no depolarization the polarization profile is flat, σP → ∞ and <sup>R</sup> <sup>=</sup> 0; R > <sup>0</sup> for a partially depolarized beam.

In general <sup>R</sup> may be different for the transverse dimensions **<sup>x</sup>** <sup>=</sup> (x, y); here for illustrative purposes we take Rx <sup>=</sup> Ry <sup>=</sup> <sup>R</sup>, with P (**x**) <sup>=</sup> <sup>P</sup><sup>0</sup> <sup>e</sup> −x2+y<sup>2</sup> 2σ2 <sup>P</sup> . A polarimeter averaging over **x** measures:

$$P\_{\text{avg}} = \frac{\int d^2 \mathbf{x} I(\mathbf{x}) P(\mathbf{x})}{\int d^2 \mathbf{x} I(\mathbf{x})} = \frac{P\_0}{1 + R} \,. \tag{12.7}$$

For collisions consider two beams with the same profile parameter R and Gaussian normalizations P0,1, P0,2. Then the polarization for the Single Spin Asymmetry (SSA) with respect to beam 1 is:

$$P\_{\rm SSA} = \frac{\int d^2 \mathbf{x} I\_1(\mathbf{x}) I\_2(\mathbf{x}) P\_1(\mathbf{x})}{\int d^2 \mathbf{x} I\_1(\mathbf{x}) I\_2(\mathbf{x})} = \frac{P\_{0,1}}{1 + \frac{1}{2}R} \,, \tag{12.8}$$

and similarly for the SSA with respect to beam 2. For Double Spin Asymmetry (DSA) measurements with both beams, the product of beam polarizations in collision is:

$$P\_{\rm DSA}^2 = \frac{\int d^2 \mathbf{x} I\_1(\mathbf{x}) I\_2(\mathbf{x}) P\_1(\mathbf{x}) P\_2(\mathbf{x})}{\int d^2 \mathbf{x} I\_1(\mathbf{x}) I\_2(\mathbf{x})} = \frac{P\_{0,1} P\_{0,2}}{1 + R} \,. \tag{12.9}$$

For R > 0 the polarimeter measurement Pavg needs to be corrected to the polarizations PSSA and P<sup>2</sup> DSA required by collider experiments. The correction depends on R, and the polarimeter must be capable of measuring the relative widths of the intensity and polarization profiles as expressed in Eqs. 12.5.

# **12.2 Implementation at RHIC**

The Relativistic Heavy Ion Collider (RHIC) is the only high energy polarized proton collider. It incorporates an ion polarimetry system meeting the needs of beam development and physics experiments. To meet the requirements outlined in Sect. 12.1 a two-pronged approach has been followed. Absolute polarimetry is provided by the hydrogen jet (Hjet) polarimeter. It is based on the process pp <sup>→</sup> pp, with a polarized atomic hydrogen jet target. The jet target is diffuse with a low data rate, requiring a long measurement period. Thus it is incapable of a statistically significant measurement of the time dependence of the polarization. Also, the target has transverse size large compared to beam bunches and can not resolve the transverse polarization structure. The fine grained time and spatial details are provided by the proton-carbon (pC) relative polarimeter. It is based on the process pC <sup>→</sup> pC, with an ultra-thin carbon ribbon target. The solid target produces a high data rate, allowing rapid measurements following the time dependence of polarization. The targets are also smaller than the beam bunch allowing resolution of transverse polarization structure. Ensembles of pC measurements are normalized to concurrent Hjet measurements, setting the absolute polarization scale.

**Fig. 12.4** Left: Side view of the Hjet polarimeter. The apparatus is approximately 3.5 m in height. Right: Diagram of the scattering chamber interior

# *12.2.1 Hjet Absolute Polarimeter*

A side view of the Hjet is shown in the left of Fig. 12.4. The polarized atomic hydrogen target beam produced in the source at the top passes through the collider proton beams in the scattering chamber. The target beam polarization is measured in a Breit-Rabi polarimeter at the bottom, with typical values <sup>P</sup>target <sup>≈</sup> 96%. In operation the polarization of the target is reversed every 5 minutes, providing both spin states as required for absolute polarimetry.

The interior of the scattering chamber is shown in the right of Fig. 12.4. The collider beams cross but do not collide in the chamber, passing through the polarized target. Silicon strip detectors left and right of the target detect scattered protons, allowing an azimuthal asymmetry measurement. The detector segmentation into strips provides measurement of the polar angle of the scattered protons.

The silicon detector signals are read out in wave form digitizers (WFDs). The amplitude of the signal is a measure of Ekin, the kinetic energy of particles; the energy scale is calibrated with americium α particle sources. The time of the digitized signal provides the time of flight (TOF) of particles from the target to the detector. A two-dimensional histogram of TOF versus Ekin from the Hjet detectors is shown in Fig. 12.5. For non-relativistic protons in the MeV energy range TOF <sup>∝</sup> <sup>1</sup>/ <sup>√</sup>Ekin. This relation is shown by the curve in the figure. The accumulation of events near the curve are the signal protons and selected for event counting, rejecting the backgrounds apparent in the histogram. Protons in the energy range 1.6–6 MeV are used for the asymmetry measurement.

Absolute polarimetry requires elastic scattering, which for the Hjet polarimeter is the process pp <sup>→</sup> pp. The relation between kinetic energy and polar angle for an elastically scattered proton is unique, shown by the blue curve in the left of Fig. 12.6. For inelastic scattering pp <sup>→</sup> pX the energy-angle relation is different,

**Fig. 12.5** TOF versus Ekin from the Hjet detectors

**Fig. 12.6** Left: Ekin versus polar scattering angle for elastic and inelastic pp scattering. Right: Ekin versus Hjet detector strip number for selected protons

with examples shown in the other curves in the figure. The strip number of the Hjet detectors is proportional to the scattering angle. The right of Fig. 12.6 shows a two-dimensional histogram of Ekin versus strip number for selected protons. The prominent accumulation of events similar to the blue curve in the left of the figure are elastic events. The events in each strip at lower energy are inelastic events and rejected for the asymmetry measurement.

The selected events are counted according to detector side, left L or right R, and spin state of the beam or target, up + or down −. The asymmetry is measured with the relation [2]:

$$\epsilon = \frac{\sqrt{N\_{R+}N\_{L-}} - \sqrt{N\_{L+}N\_{R-}}}{\sqrt{N\_{R+}N\_{L-}} + \sqrt{N\_{L+}N\_{R-}}} \, \tag{12.10}$$

This relation is independent of the efficiencies of the left and right detectors and of the numbers of up and down spin state collisions. The asymmetry is measured separately for the beam and target spin states, averaged over the other, as described in Sect. 12.1.1, and the beam polarization is determined according to Eq. 12.3. The Hjet target is larger than the size of the beam and measures the transverse averaged polarization Pavg in Eq. 12.7. The low event rate of the Hjet, due to the diffuse target, allows only one statistically significant polarization measurement each RHIC fill of ≈ 4 − 8 hours.

# *12.2.2 pC Relative Polarimeter*

A cross section of a pC polarimeter scattering chamber is shown in Fig. 12.7. A carbon ribbon target (vertical green line) is swept horizontally across the proton beam (red dot) at the center of the chamber. Six silicon strip detectors (red bars) are arranged azimuthally around the beam-target collision point, perpendicular to the beam direction. There are two such polarimeters in each RHIC beam, one with targets swept horizontally to measure horizontal polarization profiles, and one with targets swept vertically to measure vertical profiles.

The carbon ribbon targets are approximately 2.5 cm long, 10 µm wide, and 50 nm thick; the latter dimension is just a few hundred carbon atoms thick. The target width is significantly smaller than the transverse size of the beam, typically a few hundred µm, enabling the measurement of the transverse polarization profile. A photograph of a target is in the left of Fig. 12.8. The targets are mounted on a frame which rotates, sweeping the targets across the beam; a horizontally sweeping frame is shown in the center of Fig. 12.8. The frame holds six targets; when a target breaks, another can be positioned for beam sweeps, avoiding the need to break the chamber

**Fig. 12.8** Left: A carbon ribbon target. Center: Frame in scattering chamber holding six target. The frame rotates as shown by the arrow, sweeping the targets across the beam. Right:A target in the beam

**Fig. 12.9** TOF versus Ekin from the pC detectors

vacuum to replace individual targets. A photograph of a target in the beam is in the right of Fig. 12.8.

The pC readout and particle selection are similar to the Hjet. The silicon detectors signals are read out in WFDs, and the energy scale is calibrated with americium and gadolinium α sources. The Ekin versus TOF relation is used to select scattered carbon nuclei; an example is shown in Fig. 12.9. Carbon nuclei in the energy range 400–900 keV are used for the asymmetry measurement.

A generalization of Eq. 12.10 is used to measure the asymmetry. For each pC detector an asymmetry with respect to the beam spin state is determined for a free parameter λ, the imbalance of beam spin up and down states. The asymmetries for each detector at azimuthal angle φ are fit to the form:

$$
\epsilon \left( \phi \right) = \epsilon\_0 \cdot \sin(\phi - \phi\_0) \ , \tag{12.11}
$$

The sinusoidal form is motivated by fundamental spin physics. The parameter -0 is the magnitude of the asymmetry, related to the polarization by the usual relation -<sup>0</sup> <sup>=</sup> <sup>P</sup> · AN . The parameter <sup>φ</sup><sup>0</sup> is the azimuthal tilt of the spin vector from vertical;

**Fig. 12.10** Fit to pC detector asymmetries. Results are asymmetry magnitude -0, spin tilt φ0, and beam state asymmetry λ

for a 255 GeV proton beam in RHIC it is observed to deviate significantly from zero. An example fit is shown in Fig. 12.10.

The targets are not rigid and their positions relative to the beam are not known from the position of the frame on which they are mounted. Thus, the transverse polarization profile can not be directly measured from the <sup>x</sup> dependence of P (x) <sup>=</sup> P<sup>0</sup> e <sup>−</sup> <sup>x</sup><sup>2</sup> 2σ2 <sup>P</sup> . Instead, the relations in Eqs. 12.5 may be rewritten in terms of the profile parameter R in Eq. 12.6:

$$P(\mathbf{x})/P\_0 = \left(I(\mathbf{x})/I\_0\right)^R,\tag{12.12}$$

which relates polarization P as a function of intensity of I , independent of x. In practice the asymmetry is measured in bins of intensity, or event rate, and the results fit to the power law Eq. 12.12, determining R. An example of such a fit is shown in Fig. 12.11.

The high event rate afforded by a solid target allows several statistically significant pC measurements during a RHIC fill, and the determination of the polarization lifetime. During a typical RHIC store of 6 hours, measurements are made at the beginning before and after beams are ramped to full energy, in the middle and at the end of the fill before beams are dumped. Results from a RHIC fill are shown in Fig. 12.12; they are fit to a linear time dependence:

$$P(t) = P\_{t=0} \cdot (1 - t/\tau), \qquad R(t) = R\_{t=0} + R^\* \cdot t. \tag{12.13}$$

**Fig. 12.11** Fit to asymmetry versus intensity (event rate) determining the profile parameter R

**Fig. 12.12** pC polarization (top) and profile (bottom) measurements during a RHIC fill. The results are fit to linear time dependences. The first polarization measurement (marked by a cross) is at injection energy before ramping and not included in the fit

Typical polarization lifetimes at RHIC are <sup>τ</sup> <sup>=</sup> <sup>200</sup> <sup>−</sup> 400 hours. The polarization is averaged over the target sweep across the beam and is the transverse averaged polarization Pavg in Eq. 12.7. The decline of P and growth of R with time demonstrates polarization loss through the development of profiles.

# *12.2.3 pC/Hjet Normalization*

The pC analyzing power is not well known, and the measured asymmetries must be normalized to the Hjet results to determine the absolute polarization scale. The Hjet measures the average polarization over a RHIC fill weighted by the beam current I (t):

$$P\_{\rm H-\,jet} = \frac{\int dt I(t)P(t)}{\int dt I(t)}\,. \tag{12.14}$$

I (t) decreases with time as the beam decays, as shown for an example RHIC fill in Fig. 12.13. The Hjet measurement is clearly weighted toward the early part of the fill where polarization and beam current are highest.

To compare to the Hjet, the pC results for each fill must be averaged weighted by the same I (t). In terms of the parameters from a fit to pC results in Eq. 12.13, the pC average is:

$$\overline{P\_{\rm pC}} = P\_{t=0} \cdot \left(1 - \frac{1}{\pi} \cdot \frac{\int dt \, t \, I(t)}{\int dt \, I(t)}\right) \,. \tag{12.15}$$

The scale of the pC polarization is then adjusted so that an average over fills of the pC to Hjet ratio is unity: <sup>P</sup>pC <sup>P</sup>H−−jet fills = 1. Typically the average is done for each of the four pC polarimeters over an entire year of RHIC fills. An example of these ratios after normalization is shown in Fig. 12.14.

**Fig. 12.13** Beam current versus time for a RHIC fill

**Fig. 12.14** Ratio of current averaged pC and Hjet fill results after normalization versus fill number

# **12.3 Polarimetry Results**

The polarimetry results are required by physics experiments to normalize observed spin dependent effects. Polarimeter measurements are also important for development and optimization of polarized beams, and to improve understanding of beam-spin physics. An example is the measurement of the spin tune.

# *12.3.1 Results for Experiments*

The polarimeters measure the transverse averaged polarization, Pavg in Eq. 12.7. For Single Spin Asymmetry measurements with colliding beams PSSA in Eq. 12.8 is required; it is related to Pavg by a function of the profile parameter R. From the fill results for Pavg(t) and R(t) in Eq. 12.13, PSSA(t) is expressed to first order in the time t. Example results are shown in Fig. 12.15. Polarization is provided for the two RHIC beams BLUE and YELLOW. Included is a Unix time stamp for the start of the fill, <sup>t</sup> <sup>=</sup> 0, when the polarization is P0. Along with <sup>d</sup>P/dt, this allows determination of the polarization throughout the fill, for application when different data sets are collected by the experiments.

The profile parameter typically has small values <sup>R</sup> <sup>=</sup> <sup>0</sup>.<sup>1</sup> <sup>−</sup> <sup>0</sup>.2. From Eqs. 12.8,12.9, to lowest order in R:

$$P\_{\rm DSA}^2 = P\_{\rm SSA,1} \cdot P\_{\rm SSA,2} \,, \tag{12.16}$$

provides the product of beam polarizations for Double Spin Asymmetry measurements.


**Fig. 12.16** RHIC spin flipper. It consists of five AC dipoles and four DC dipoles

# *12.3.2 Spin Tune Measurement*

The RHIC spin flipper is a system of AC and DC dipole magnets allowing manipulation of the proton spin. A schematic is shown in Fig. 12.16. When operated in pulsed mode, it can flip the spin orientation. This feature has been demonstrated, observed as a sign change in the usual polarimeter measurements [3]. However, such operation often results in the loss of polarization, requiring time consuming refills of freshly polarized beams for detailed measurements.

When the spin flipper is operated in continuous mode, it can induce a coherent spin precession about the stable spin direction [4]. Expressed as a fraction of the RHIC revolution frequency, the frequency of the precession is that of the spin flipper AC dipoles, νosc. The opening angle of the precession cone θ<sup>0</sup> is related to νosc and the spin tune νs by:

$$\tan(\theta\_0) = \frac{|\epsilon|}{\nu\_s - \nu\_{\rm osc}} \,. \tag{12.17}$$

 is the strength of the driven spin resonance and is known from the design of the spin flipper. Thus, if the flipper is driven with a frequency νosc, measurement of θ<sup>0</sup> provides a measurement of the spin tune νs.

The pC polarimeter measures the projection of the spin vector in the plane transverse to the beam direction (see Sect. 12.2.2). Figure 12.17 shows the projection of a spin precession cone in the transverse plane; the dotted red line is the path traced by the spin vector. θ<sup>0</sup> is the opening angle of the cone, as in Eq. 12.17. θtilt is a possible tilt from vertical of the un-driven stable spin direction.

The phase of the spin flipper AC dipoles was incorporated into the pC polarimeter readout, allowing measurements as a function of the dipole phase. The results of such measurements for one value of νosc are shown in Fig. 12.18, where the dipole phase is 2πνosci. An oscillation of the measured tilt φ<sup>0</sup> as a function of the phase is

**Fig. 12.17** Parameters of spin precession projected into the plane transverse to the beam direction

**Fig. 12.18** Results of pC spin tilt measurements as a function of spin flipper driver phase for one value of νosc

clearly observed. The data are fit to the form:

$$\phi\_0(2\pi\,\nu\_{\rm osc}\mathbf{i}) = \theta\_{\rm tilt} + \tan^{-1}\left[\tan\theta\_0 \cdot \cos(2\pi\,\nu\_{\rm osc}\mathbf{i} - \Psi)\right].\tag{12.18}$$

Here is an arbitrary shift between the driver phase and pC readout introduced by cable delay. The resulting θ<sup>0</sup> then determines the tune shift via Eq. 12.17.

A series of such measurements have been performed at both injection and full RHIC energies [4]. This has established the nondestructive measurement of the spin tune as a tool for further investigations of beam spin dynamics.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 13 Electron Polarimetry**

301

**Dave Gaskell**

**Abstract** Electron polarimetry benefits from the ability to use processes with wellknown analyzing powers, hence enabling high precision measurements. Several techniques are employed to measure electron beam polarization, including Mott, Møller, and Compton polarimetry. Each technique has particular advantages and disadvantages, depending on the application. This chapter will focus on the techniques used to measure electron beam polarization, with particular emphasis on the challenges and requirements for achieving high precision. The development of a conceptual design of a Compton polarimeter for the future Electron Ion Collider will also be discussed.

# **13.1 Introduction**

Polarized electron beams have been used to great effect in both fixed target accelerators as well as colliders and storage rings. The precision of the electron beam polarization measurement is in general driven by experimental requirements. While measurements providing uncertainties on the order of *dP /P* <sup>≈</sup> <sup>2</sup> <sup>−</sup> 3% are sufficient in many cases, there is an increasing demand for high precision

e-mail: gaskelld@jlab.org

This manuscript has been authored by Brookhaven Science Associates, LLC under Contract No. DE-SC0012704 with the U.S. Department of Energy. The United States Government and the publisher, by accepting the article for publication, acknowledges that the United States Government retains a non-exclusive, paid-up, irrevocable, world-wide license to publish or reproduce the published form of this manuscript, or allow others to do so, for United States Government purposes.

D. Gaskell (-)

Experimental Nuclear Physics, Thomas Jefferson National Accelerator Facility, Newport News, VA, USA

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_13

measurements of the polarization, with systematic errors of 1% or better (primarily for experiments employing parity-violating electron scattering such as Q-Weak [1], PREX [2], and the future MOLLER [3] and SoLID [4] experiments). The future Electron Ion Collider (EIC), will require high precision polarimetry (1%) for both electron and hadron beams to fully leverage its expected experimental capabilities.

Typically, three main techniques are used to measure electron beam polarization:


The above techniques are discussed in great detail in Ref. [5], but will be briefly summarized in the sections that follow. It is worth noting that there are additional techniques such as Compton Transmission polarimetry (see for example Refs. [6] and [7]) and so-called "Spin-light" polarimetry [8–10], but these will not be discussed here.

# **13.2 Mott Polarimetry**

Mott polarimetry takes advantage of the asymmetry generated when a transversely polarized electron scatters from an unpolarized large *Z* nucleus. The asymmetry is generated by the spin-orbit interaction of the electron with the electrostatic field of the nucleus.

The cross section for a polarized electron undergoing Mott scattering at an angle *θ* is,

$$\sigma(\theta,\phi) = I(\theta)[1 + S(\theta)\,\overrightarrow{P}\,\cdot\,\hat{n}],\tag{13.1}$$

where *I (θ )* is the unpolarized cross section, −→*<sup>P</sup>* is the electron polarization, *<sup>n</sup>*<sup>ˆ</sup> is the unit vector normal to the electron scattering plane, and *S(θ )* is the so-called Sherman function, or the Mott scattering analyzing power. The Sherman function is large at

**Fig. 13.1** Sherman function for gold vs. Mott scattered electron angle, *θ* (lab). The Sherman function is larger at backward angles, and at energies of a few MeV approaches its maximum at close to 180 degrees. Figure from Refs. [5, 11]

backward scattering angles, the maximum value occurring at angles approaching 180 degrees at beam energies of a few MeV (see Fig. 13.1).

Some aspects of Mott polarimetry have been described in Sect. 11.8. In general, Mott polarimetry is used in the keV to few MeV range so is typically employed in conjunction with polarized sources. One key advantage of Mott polarimetry is the fact that a polarized target is not required, simplifying experimental aspects of the measurement. On the other hand, the measurement is complicated by the fact that the effective Sherman function for scattering from targets of finite thickness is not the same as the single-atom Sherman function. In the past, this has resulted in systematic uncertainties due to knowledge of the Sherman function estimated to be on the order of 1%. However, recent theoretical and Monte Carlo studies have reduced this uncertainty to ≈0.5% resulting in an overall uncertainty of 0.61% [12].

Mott polarimeters are in regular use at CEBAF at Jefferson Lab [12] and at Mainz [13]. While regularly used for checking the performance of the polarized sources, the precision of these polarimeters is such that they are increasingly incorporated in final experimental results.

# **13.3 Møller Polarimetry**

Møller polarimetry measures electron beam polarization using the scattering of polarized electrons from (polarized) atomic electrons in a nucleus. In general, the polarized electrons are generated by applying a magnetic field to a ferromagnetic foil.

At energies above 100 MeV, the longitudinal and transverse analyzing powers for polarized Møller scattering are essentially independent of beam energy and are given by,

$$A\_{\rm long} = -\frac{\sin^2 \theta^\* (7 + \cos^2 \theta^\*)}{(3 + \cos^2 \theta^\*)^2},\tag{13.2}$$

$$A\_{\rm T,x} = -\frac{\sin^4 \theta^\*}{(3 + \cos^2 \theta^\*)^2},\tag{13.3}$$

where *A*long is the analyzing power for longitudinally polarized beam and target electrons, *A*T,x for horizontally polarized beam and target electrons, and *θ* <sup>∗</sup> is the center-of-mass scattering angle. Note that the analyzing power is maximized for *<sup>θ</sup>* <sup>∗</sup> <sup>=</sup> 90 degrees. The longitudinal and transverse Møller analyzing powers are shown in Fig. 13.2.

Møller polarimetry has the advantage of providing rapid and precise beam polarization measurements, but with the caveat that the measurement is generally destructive to the electron beam due to the need to use ferromagnetic foil targets. In addition, Møller measurements are generally limited to rather low beam intensities (a few µA) since beam heating of the target foils leads to target depolarization. Before the late 1990s, most Møller polarimeters used targets slightly tilted with respect to the beam direction with a small applied magnetic field to polarize the electrons in the plane of the foil. This had the disadvantage that the foils were not fully magnetically saturated and the electron polarization had to be inferred from insitu measurements of the foil magnetization. The group from the University of Basel had the insight that by driving a pure iron foil into magnetic saturation using a 3–4 T applied field, out of plane and parallel to the beam direction, the uncertainties associated with the target polarization (typically at least 2%) could be greatly reduced. A polarimeter using such a target system was built in experimental Hall C at Jefferson Lab with the resulting systematic uncertainty due to target polarization estimated to be 0.25% [14]. This development opened the door to precision Møller polarimetry, resulting in measurements with systematic uncertainties better than 1%.

Other considerations in the implementation of Møller polarimetry include:


Recent applications of Møller polarimetry have made an effort to address the above issues, and using a saturated iron foil target have reported results with precision better than 1% [2, 16].

Møller polarimetry is used almost exclusively at fixed-target facilities such as SLAC, MAMI, and Jefferson Lab. Application in a storage ring would require the development of a non-destructive target. A target based on atomic hydrogen stored in a cold magnetic trap is being pursued at Mainz for the P2 experiment. There is some question as to whether such a target would remain polarized at the high beam intensities generally used in a storage ring. A jet target would be another potential alternative, and some initial tests of Møller polarimetry using such a target were performed at VEPP3 [17], although further work would be required to determine the ultimate precision that could be achieved.

# **13.4 Compton Polarimetry**

A Compton polarimeter measures electron beam polarization via the collision of circularly polarized laser light of energy ∼few eV with high energy electrons. The backscattered photon energy (*Eγ* ) is significantly larger than the laser photon energy (*Elaser*), and is proportional to the relativistic gamma factor (squared) of the incoming electron:

$$E\_{\mathcal{Y}} = E\_{laser} \frac{4a\chi^2}{1 + a\theta\_{\mathcal{Y}}^2 \chi^2},\tag{13.4}$$

where *<sup>γ</sup>* <sup>=</sup> *Ee/me* (with *Ee* and *me* the electron energy and mass) and *<sup>a</sup>* <sup>=</sup> *(*<sup>1</sup> <sup>+</sup> 4*γ Elaser/me)*−1. The backscattered photon energy as a function of electron beam energy at the kinematic endpoint (180-degree scattering) for a green, 532 nm laser is shown in Fig. 13.3.

The Compton analyzing power for longitudinally polarized electrons depends only on the backscattered photon energy and is given by,

$$A\_{\rm long} = \frac{2\pi r\_o^2 a}{(d\sigma/d\rho)} (1 - \rho(1+a)) \left[ 1 - \frac{1}{(1 - \rho(1-a))^2} \right],\tag{13.5}$$

where *ro* is the classical electron radius, *ρ* is the backscattered photon energy divided by its kinematic maximum, *Eγ /Emax <sup>γ</sup>* , and *dσ/dρ* is the unpolarized Compton cross section. The transverse analyzing power depends both on the backscattered photon energy and the azimuthal angle (*φ*) between the electron polarization direction and the backscattered photon,

$$A\_{\rm T} = \frac{2\pi r\_o^2 a}{(d\sigma/d\rho)} \cos \phi \left[\rho(1-a) \frac{\sqrt{4a\rho(1-\rho)}}{(1-\rho(1-a))}\right].\tag{13.6}$$

This dependence on the azimuthal angle results in an asymmetry that depends on the location of the backscattered photon. For example, a vertically polarized electron beam would result in an "up-down" asymmetry. The longitudinal and transverse analyzing powers are shown in Fig. 13.4.

A basic Compton polarimeter requires a laser system, a dipole to deflect the electron beam away from the path of the backscattered photons, and a detector system for those photons. The scattered electrons are momentum-analyzed in the same dipole and those electrons are then separated from the beam, which allows the use of a position sensitive electron detector.

**Fig. 13.4** Compton longitudinal (left) and transverse (right) analyzing power as a function of relative backscattered photon energy, *ρ*. The analyzing power is shown for 5,10, and 18 GeV electrons assuming a 532 nm (green) laser. The transverse asymmetry is evaluated at *<sup>φ</sup>* <sup>=</sup> <sup>0</sup>

Some considerations for the application of Compton polarimetry include:


Most Compton polarimeters constructed in recent years have been used to measure the longitudinal beam polarization. The highest precision device was used in the SLD experiment at SLAC and quoted a systematic uncertainty of *dP /P*=0.52% at 45.6 GeV [18]. The SLD Compton measured the scattered electrons in multi-event (integrating) mode using a segmented gas Cherenkov detector. Jefferson Lab has Compton polarimeters in experimental Halls A and C, achieving systematic errors of 0.59% in Hall C [19] (using a diamond strip electron detector) and 1% in Hall A [20, 21] (using a silicon strip electron detector operated in single-event mode and a photon calorimeter operated in integrating mode). Longitudinal Compton polarimeters have also been implemented at MIT-Bates, NIKHEF, and HERA. In addition to the longitudinal polarimeter, HERA also deployed a transverse Compton, one of the few transverse Compton polarimeters intended to provide relatively precise absolute measurements of the beam polarization. In the end, the final systematic uncertainty for this device was 2.9% [22]. It is worth noting that the EIC will require measurement of the degree of transverse as well as longitudinal electron polarization and as one of the few examples of transverse Compton polarimetry, the HERA TPOL provides useful lessons for implementation at EIC.

# **13.5 Polarimetry for EIC**

The Electron Ion Collider will be the first collider with both polarized hadrons and electrons, and the high luminosity will allow extremely high statistical precision for a range of processes (DIS, SIDIS, and exclusive reactions) over a large kinematic range. It is crucial that the experimental systematic uncertainties are also under control to fully leverage the capabilities of the EIC. Specifically, the systematic uncertainty goal for polarimetry (for both electrons and hadrons) is *dP /P*=1%.

The EIC layout is shown in Fig. 13.5. The electrons are generated with full polarization at the electron source, accelerated to 400 MeV in the Injector Linac, and then enter the Rapid Cycling Synchrotron (RCS) where they are accelerated to the full beam energy (5 to 18 GeV). From the RCS, electron bunches enter the Electron Storage Ring (ESR) where they interact with the hadron bunches at the experimental area at IR6. Mott polarimetry will be used at the polarized source, measurements of the polarization are planned just after the RCS (Møller and Compton polarimetry are both being studied), and a Compton polarimeter will be used in the Electron Storage Ring. The discussion here will focus on the conceptual design of the ESR Compton polarimeter. Note that since the design of the EIC is still ongoing, the final configuration of the EIC Compton polarimeter may differ from what is presented here.

**Fig. 13.5** Layout of the Electron Ion Collider. Electrons start at the polarized source (3 o'clock), are accelerated to full energy in the RCS (red ring) and then injected into the ESR


**Table 13.1** EIC electron beam properties at 5, 10, and 18 GeV

The design of the ESR Compton polarimeter depends on the electron beam properties as well as the polarimeter requirements. The main requirements of the EIC Compton in the ESR are:


The EIC electron beam properties are summarized in Table 13.1. The high bunch frequency (24.75–99 MHz) and the requirement to measure the electron beam polarization for each bunch pose the first significant challenge. The small time between bunches (about 10 ns at 5 and 10 GeV) means that the Compton detectors and laser system must have very fast time response. While the high average intensity of the beam has benefits for making rapid measurements, it also implies larger than average backgrounds, especially synchrotron radiation. In addition, due to lack of space, the polarimeter cannot be placed at the experiment at IR6, so there will be some spin precession between the Compton location and the experiment. This means that in order to extract the absolute polarization with high precision, the polarimeter must be designed to have small systematic errors for both longitudinal and transverse polarization measurements simultaneously.

The layout of the Compton polarimeter at its proposed location upstream of IR6 is shown in Fig. 13.6. As seen in the figure, the laser enters the beamline vacuum downstream of the 3rd dipole in the section shown, and interacts with the electron beam at the location of the quadrupole between the 2nd and 3rd dipoles. The backscattered photon detector will be about 20–30 meters downstream of the Compton interaction point while the electron detector will be closer since the large dispersion introduced by the dipole results in sufficient spatial separation of the scattered electrons without as much drift.

The main elements of the ESR Compton polarimeter are described in more detail in the EIC Yellow Report [23], but are summarized briefly here.

**Fig. 13.6** Layout of the ESR Compton polarimeter, upstream of IR6. The elements labeled D2EF\_5 denote dipoles, while the elements labeled QxEF\_5 (where x=5-12) are quadrupoles

### **Laser System**

The ideal laser system for the Compton polarimeter would be a pulsed laser with the same repetition rate and similar pulse width as the electron bunches. While pulsed lasers at 100 MHz are readily available using commercial mode-locked systems, these lasers lack flexibility and multiple systems would be required for operation at 99 and 24.75 MHz. Instead, the planned system for the EIC Compton makes use of a gain-switched diode laser, operated at a frequency determined by an RF source. Such diode lasers are readily commercially available and are relatively inexpensive. The gain-switched diode (providing light at 1064 nm) is then amplified using fiber amplifiers and subsequently frequency doubled to 532 nm.

Luminosity calculations indicate that an average power of 5–10 W is sufficient to generate one backscattered photon per laser-electron bunch crossing. Since the polarimeter will operate in single event counting mode, higher luminosity is not required.

This system is similar to laser systems that have been used at Jefferson Lab in the injectors for the CEBAF accelerator and Low Energy Recirculator Facility (LERF) with much success and have demonstrated great reliability. The fact that the system is modular (seed laser, fiber amplifier, doubling system) is also a benefit in that it facilitates easier repair.

### **Position Sensitive Detectors**

Position sensitive detectors are required for both the scattered electrons and the backscattered photons. As noted earlier, the scattered electrons are momentumanalyzed in the 3rd dipole such that electrons of different energy are spread out in the horizontal direction. A horizontally segmented detector allows the determination of the electron energy, and the asymmetry vs. energy can be extracted for determination of the longitudinal polarization. Studies have shown that reliable determination of the polarization requires at least 30 bins in energy between the asymmetry zerocrossing and the kinematic endpoint. For the configuration at EIC, this implies a required segmentation of about 400 µm. Note that the electron detector will not be sensitive to the degree of transverse polarization since the transverse electron spin direction will also be in the horizontal plane, resulting in a left-right asymmetry. This left-right asymmetry cannot be extracted due to energy dispersion of the 3rd dipole.

The photon detector, on the other hand, has no such issue and will be used to measure the degree of transverse electron polarization via the left-right asymmetry. In principle, one must know the horizontal position of the photon detector relative to the beam-laser collision point to accurately fit the left-right asymmetry. However, with sufficient detector position resolution, one can allow the asymmetry zerocrossing position to float in the fit, making extraction of the polarization insensitive to the detector position. Studies indicate that a segmentation of about 100 µm is sufficient for a detector placed 20 m from the Compton-electron IP (see Fig. 13.7).

Diamond strip detectors are an excellent candidate for both the electron and photon position sensitive detectors. The required segmentation is readily achievable

**Fig. 13.7** Simulated transverse electron asymmetry at the position of the photon detector (20 m from the Compton-electron IP) vs. horizontal position. In this example, the detector has been deliberately offset by 0.5 mm, but the fit still results in the correct beam polarization (85.0%) when using bin sizes of 100 µm and including the offset as a parameter in the fit

and diamond detectors have the advantage of being very radiation hard. In addition, diamond has been shown to have response times compatible with the 10 ns spacing of the EIC electron bunches, although some development is likely required for the amplification and readout electronics.

### **Photon Calorimeter**

A calorimeter is required to measure the energy of the backscattered photon. Radiation hardness, good energy resolution, and fast time response are desirable. Although lead-tungstate has good energy resolution and is relatively radiation hard, there is a mix of fast and slow time components in the detector response that may make such a detector incompatible with the 10 ns bunch structure. A tungstenpowder calorimeter is also under consideration, but its energy resolution is worse than lead-tungstate which may result in larger systematic uncertainties. Detailed Monte Carlo simulations will be required to determine if the tungsten-powder response is adequate.

# **13.6 Summary**

In contrast to hadron polarimetry, there are several processes available which allow the measurement of the absolute polarization of electrons. Mott, Møller, and Compton polarimetry are the most frequently used techniques and all three have areas in which they are optimal. Precision measurements in the field of parity violating electron scattering have been the primary motivation for recent improvements in electron beam polarimetry. Although not discussed in detail here, direct comparisons of different devices using different techniques have played an important role in demonstrating the reliability of polarization measurements and have helped identify previously unknown systematic uncertainties [24]. Electron beam polarimetry will also be crucial to the success of the EIC program—achieving the needed performance of the Compton polarimeter in the EIC electron storage ring will pose unique challenges that require further developments.

**Acknowledgments** This material is based upon work supported by the U.S. Department of Energy, Office of Science, Office of Nuclear Physics under contracts DE-AC05-06OR23177.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Chapter 14 Spin Dynamics Tutorial: Numerical Simulations**

315

**Kiel Hock, François Méot, and Vasiliy Morozov**

The next two Sections provide the material of a miniworkshop which extended over the two weeks of the Summer 2021 USPAS Spin Class, and was integral part of the teachings.

The work proposed to the attendees essentially consisted in the numerical simulation of polarized beam manipulations in the AGS injector—"AGS Booster" starting from basic principles (computation of resonance strengths, resonance crossing, effect of synchrotron radiation, etc.), and extending to the application of polarization preservation techniques (harmonic orbit correction or excitation, ac dipole, snakes, spin matching, etc.). As a matter of fact, for simplicity the same lattice, the AGS Booster, with magnetic rigidity adapted in consequence,

K. Hock · F. Méot (-)

V. Morozov Oak Ridge National Laboratory, Oak Ridge, TN, USA e-mail: morozovvs@ornl.gov

This is a U.S. government work and not under copyright protection in the U.S.; foreign copyright protection may apply 2023 F. Méot et al. (eds.), *Polarized Beam Dynamics and Instrumentation in Particle Accelerators*, Particle Acceleration and Detection, https://doi.org/10.1007/978-3-031-16715-7\_14

This manuscript has been authored by employees of Brookhaven Science Associates, LLC, under Contract No. DE-SC0012704 with the US Department of Energy. The publisher by accepting the manuscript for publication acknowledges that the US Government retains a non-exclusive, paidup, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US Government purposes.

This manuscript has been authored in part by employees of UT-Battelle, LLC, under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The publisher acknowledges the US government license to provide public access under the DOE Public Access Plan (http:// energy.gov/downloads/doe-public-access-plan).

Brookhaven National Laboratory, Upton, NY, USA e-mail: khock@bnl.gov; fmeot@bnl.gov

was used for simulations concerning indifferently hadron polarization, or electron polarization and the effect of synchrotron radiation.

The miniworkshop covers many of the theoretical aspects addressed during the lectures, and the main goal in performing these numerical simulations is to compare their outcomes and theoretical expectations.

Section 14.1 gives the assignments. A first part addresses hadron (precisely, helion, Table 14.1) beams (Sects. 14.1.1.1–14.1.1.17 and Tables 14.2, 14.3), a second part deals with electrons and synchrotron radiation (Sects. 14.1.2.1–14.1.2.5).

Section 14.2 gives detailed solutions of these numerical simulation exercises.

Finally, everything starts from a single input data file, "superA.inc", short enough to be given in its entirety in Table 14.4 and subsidiary Tables 14.5 and 14.6, the latter two being a series of 6 cells constitutive of the AGS Booster ring. Nothing else is needed but the code executable, "zgoubi", downloadble from sourceforge [1]. The execution for instance of the said input data file is a mere

### zgoubi -in superA.inc

All gnuplot [2] and zpop<sup>1</sup> graphs in the present assignments and in their solutions (Sect. 14.2) derive from ancillary files produced (readable during and upon completion of simulation) by this simple execution instruction. The input data file taken from these Tables 14.4, 14.5 and 14.6 is developed further when needed, namely very little, as required in one or the other of these various problems.

However, simulation input and output data files of many of the exercises have been saved in Zgoubi development repository, where they can be downloaded from: https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/exemples/uspasSpinClass\_2021/

Besides, users may want to consider the use of python interfaces to zgoubi, subject to continuing development and available on web, pyZgoubi [4] and zgoubidoo [5], or the ad hoc HPC environment interface in Sirepo [6] where as well AGS Booster input data files may be found.

# **14.1 Numerical Simulations: Problems**

The numerical simulations proposed in this Section address many of the theoretical aspects of polarized hadron beam acceleration and of electron polarization, introduced in the lectures. They use stepwise ray-tracing techniques (i.e., a step-by-step integration of the equations of particle and spin motion), the reason for this is that the method allows detailed inspection of motion across optical elements, whether using analytical magnetic/electric field models or field maps, and it allows accurate Monte Carlo simulations such as stochastic emission of photons (synchrotron radiation) and its effects on particle and spin dynamics.

<sup>1</sup> Zgoubi's plotting and data treatment companion [3].


**Table 14.1** Parameters of helion, 3He2+, the particle considered in the exercises. Proton data are given for comparison. Note: atomic mass unit: 931.4940954 MeV*/*c2; *μN* <sup>=</sup> *eh/*¯ <sup>2</sup>*<sup>m</sup>*

Three different classes of problems regarding the manipulation of polarized beams in circular accelerators are addressed:


Both series of simulation problems will use the same lattice, namely the AGS Booster ring. This means in particular, the same optical sequence input data files, mutatis mutandis.

### **Hadron Polarization Simulations**

Beam-beam collisions involving polarized helion (3He2+) are part of the physics programs at the EIC. Polarized helion beams are produced using an EBIS source. Prior to injection in the EIC HSR (Hadron Storage Ring, an evolution of RHIC collider rings), helion beams are accelerated in the AGS Booster and in the AGS (Fig. 14.1).

At low rigidity, the cold snakes in the AGS cause harmful optical distortions, including linear coupling. A path to overcome this issue is by injecting 3He beams at a high enough energy that these distortions become negligible. On the other hand, under the effect of two partial snakes, the stable spin direction **n**<sup>0</sup> in the AGS is at an angle to the guiding field, with a least magnitude every |*Gγ* | = 3*n* + 1*.*5 (Fig. 14.2). As a result, it is foreseen to extract 3He beams from the Booster at |*Gγ* | = 10*.*5. These will be the conditions considered in these exercises, regarding hadron polarization.

### **Electron Polarization Simulations**

High polarization of the electron beam at the collision points is required by the EIC physics program. Relativistic electrons emit photons, and a small fraction of these radiated photons contribute to spin flip, which builds up beam polarization

**Fig. 14.1** RHIC injector cascade, the future EIC hadron injector system, in 2021 (RHIC itself is not shown): *H* − 200 MeV linac, EBIS ion sources, AGS booster (which also accelerates ions for the NSRL, NASA Space Research Lab), the AGS, and the AGS to RHIC (AtR) injection line

**Fig. 14.2** Vertical component of AGS **n**<sup>0</sup> spin eigenvector, in the presence of two partial snakes. The angle to the vertical guide field is minimal every three units, *Gγ* = −7*.*5*,* −10*.*5*,* −13*.*5*,* etc

through the Sokolov-Ternov effect. In the vast majority of cases, photon emission is associated with noisy orbital motion causing extra spin diffusion, i.e. depolarization.

In the present simulations regarding high energy electrons in a storage ring, rather than using the EIC electron storage ring (ESR) lattice, the very ring considered for hadrons, the AGS Booster, is used. There are various reasons for that: the Booster is a short ring (200 m), whereas the ESR is 3.8 km, this results in quicker tracking; it allows, quite efficiently, for dealing with a single lattice for studies of both, hadron and electron spin dynamics; the AGS Booster lattice is much simpler than the ESR one, input data files are easier to handle; moving from hadron to electron simulations (or vice versa) reduces to essentially a matter of changing the reference rigidity and the nature of the particle.

The goals in the electron polarization simulations are to:


### **Practical Aspects Regarding These Numerical Simulations**

When developing simulation input data files, or when using existing ones, in order for what's computed, and the physics behind it, to be clear to the user, it can not be avoided to refer to the Users' Guide [1]. Having it at hand, ready to use, and consulting it whenever something happens which looks weird, or looks like going awry, is recommended.

A good thing to do when questions arise—and many will, is to navigate in the INDEX section of the Users' Guide. Note the two main parts in the Users' Guide: PART A which comments on the physics content and capabilities of the various optical elements and commands, and PART B which details the formatting of the data in an input data file. Two bold numbers generally appear in the guide INDEX, for any item; the first points to Part A, and the second to Part B. Additional considerations that may usefully be given some attention, are documented in the Appendix.

The computation of spin and orbital motion in this code uses stepwise ray-tracing techniques. This means that it solves the Lorentz and T-BMT differential equations proper, with no approximations on particle or spin dynamics, step-by-step. This allows accurate field modeling (and that does not preclude approximate field models if desired anyway) and detailed insight regarding their effect on spin motion.

In any event, one should not lose sight of the goal of the present simulation exercises, which is not especially to learn about a computer code. It is rather to play with, and learn about, spin dynamics in electric and magnetic fields, snakes, rotators, synchrotron radiation and spin diffusion, as a complement to the various theoretical chapters.

# *14.1.1 Polarized Helion in AGS Booster*

### **14.1.1.1 AGS Booster Parameters**

The ring lattice used for these exercises is a simplified version of the AGS Booster, composed of 6 superA super cells. Lattice parameters are given in Table 14.2, the table needs to be completed as part of the exercises.

The superA sequence (Table 14.4) is taken from the MAD8 [7] model used for Booster operation. The resulting optical functions of superA are displayed in Fig. 14.3.

*Question 14.1.1.1-1*: Complete Table 14.2 with the missing numerical values. These parameters will be used throughout the simulations, in particular in setting proper data values in the simulation input data files.

**Fig. 14.3** Booster superA cell optical functions, as per MAD8 [7] model used for Booster operation. A simplified Booster lattice, comprised of 6 such super cells (parameters given in Table 14.2), is used in the present simulations


### **14.1.1.2 Cell and Lattice Optics**

It is necessary to first check lattice parameters, viz simulation input data files, prior to engaging in fancy spin tracking simulations.

The Zgoubi input data file superA.inc (Table 14.4) has been translated from the MAD model (Sect. 14.1.1.1); this and other Zgoubi input data files used in subsequent exercises can be found in [8].

*Question 14.1.1.2-1*: Run that file, namely (with [pathTo]/ being the address of the folder that contains the Zgoubi executable on your computer):

[pathTo]/zgoubi -in superA.inc

This produces the transport matrix of super cell A, and its periodic beam matrix and tunes (logged in zgoubi.res).

Explain the role of the FIT procedure.

*Question 14.1.1.2-2*: Check the lattice parameters against Table 14.2 data (they are logged at the end of the sequence, bottom of zgoubi.res result listing).

**Table 14.4** The superA cell sequence in this superA.inc data file features the markers MARKER[LABEL1=superA\_S] and MARKER[LABEL1=superA\_E] at its extremities. These labeled MARKERs allow that very section of superA.inc, and that section only, to be INCLUDEd in further job files—INCLUDE has a similar function to CALL in MAD job files. This input file superA.inc itself INCLUDEs the LA1, LA2, LA3, LA6 subsections (Tables 14.5 and 14.6). Comments are provided for guidance, consulting the Users' Guide is unavoidable

```
superA.inc data file
'OBJET'
1000.000000 ! Reference rigidity (kG.cm).
5 ! An option to generate 11 particles (convenient for MATRIX computation),
.01 .001 .01 .001 0. .001 ! with the sampling specified in this line,
0. 0. 0. 0. 0. 1. ! and centered on these values, Y, T, Z, P, s, D.
'FAISCEAU' ! Local particle coordinates.
'SCALING' ! A sort of "power supplies rack", allows tweaking fields
1 5 ! (a field scaling factor), in 7 different families of magnets, here.
BEND
1.
1
MULTIPOL
1.
1
MULTIPOL QHA* ! These two families, QHA* and QVA* (* is a wild card)
1.0864492 ! FIT variable #12.
1
MULTIPOL QVA*
1.0657342 ! FIT variable #16.
1
MULTIPOL DVCA* ! Make sure all vertical kickers are zero-ed.
0.
1
'MARKER' superA_S
'INCLUDE'
1
LA1.inc[LA1S:LA1E]
'INCLUDE'
1
LA2.inc[LA2S:LA2E]
'INCLUDE'
1
LA3.inc[LA3S:LA3E]
'INCLUDE'
1
LA2.inc[LA2S:LA2E]
'INCLUDE'
1
LA1.inc[LA1S:LA1E]
'INCLUDE'
1
LA6.inc[LA6S:LA6E]
'INCLUDE'
1
LA1.inc[LA1S:LA1E]
'INCLUDE'
1
LA2.inc[LA2S:LA2E]
'MARKER' superA_E
'FIT' ! Find the 4D closed orbit (nil, in the present case of perfect cell)
6 nofinal ! and set the (fractional) cell tune values.
1 30 0 [-1,1]
1 31 0 [-10,10]
1 32 0 [-1,1]
1 33 0 [-10,10]
3 12 0 1.
3 16 0 1.
6 1e-15 ! 6 constraints (and penalty = 1e-15):
3.1 1 2 #End 0. 1. 0 ! Y_0= Y(end of sequence),
3.1 1 3 #End 0. 1. 0 ! T_0= T(end of sequence),
3.1 1 4 #End 0. 1. 0 ! Z_0= Z(end of sequence),
3.1 1 5 #End 0. 1. 0 ! P_0= P(end of sequence).
0.1 7 7 #End 0.788333333333 1. 0 ! 6-cell Qy=4.73/6.
0.1 8 8 #End 0.803333333333 1. 0 ! 6-cell Qy=4.82/6.
'FAISCEAU' ! Local particle coordinates.
'MATRIX'
1 11
'END'
```
**Table 14.5** LA1.inc and LA2.inc optical sequences. These are two of the 4 different files (LA1.inc, LA2.inc, LA3.inc, LA6.inc) that make up the LA1.inc-LA2.inc-LA3.inc-LA2.inc-LA1.inc-LA6.inc-LA1.inc-LA2.inc superA.inc super cell sequence of Booster. These LA\*.inc are subject to INCLUDE in superA.inc data file (Table 14.4)

```
'MARKER' LA1S
'DRIFT' DRIF L057
57.0400
'MULTIPOL' DVCA1 VKIC
0 .kicker
0.1E-03 10.0000 -0.0E+00 0. 0. 0. 0. 0. 0. 0. 0. 0.
.0 .0 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
4 .1455 2.2670 -.6395 1.1558 0. 0. 0.
.0 .0 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
4 .1455 2.2670 -.6395 1.1558 0. 0. 0.
1.570796327 0. 0. 0. 0. 0. 0. 0. 0. 0.
#20|3|20 Kick
1 0. 0. 0.
'DRIFT' DRIF L007
6.9600
'MULTIPOL' SVA1 SEXT
0 .Sext
0.1E+02 10. 0. 0. 0.000 0. 0. 0. 0. 0. 0. 0.
0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
2. ! cm MultSVA1
1 0. 0. 0.
'DRIFT' DRIF L014
13.8050
'DRIFT' MONI PUEVA1
0.0000
'DRIFT' DRIF L011
11.6867
'MULTIPOL' QVA1 QUAD
0 .Quad
0.493916E+02 10. 0. -0.5472896982 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
2. ! cm MultQVA1
1 0. 0. 0.
'DRIFT' DRIF L029
29.4917
'BEND' DHA1T SBEN
0 .Bend
1.2096161E+02 0.00E+00 7.2121043E-01
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'BEND' DHA1Z SBEN
0 .Bend
1.2096161E+02 0.00E+00 7.2121043E-01
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'MARKER' LA1E
'END'
```
'MARKER' LA2S 'DRIFT' DRIF L057 57.0400 'MULTIPOL' DHCA2 HKIC 0 .kicker 0.1E-03 10.0000 -0.0E+00 0. 0. 0. 0. 0. 0. 0. 0. 0. .0 .0 1. 0. 0. 0. 0. 0. 0. 0. 0. 4 .1455 2.2670 -.6395 1.1558 0. 0. 0. .0 .0 1. 0. 0. 0. 0. 0. 0. 0. 0. 4 .1455 2.2670 -.6395 1.1558 0. 0. 0. 0.00 0. 0. 0. 0. 0. 0. 0. 0. 0. #20|3|20 Kick 1 0. 0. 0. 'DRIFT' DRIF L007 6.9600 'MULTIPOL' SHA2 SEXT 0 .Sext 0.1E+02 10. 0. 0. 0.000 0. 0. 0. 0. 0. 0. 0. 0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0 6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723 0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0 6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 2. ! cm MultSHA2 1 0. 0. 0. 'DRIFT' DRIF L014 13.8050 'DRIFT' MONI PUEHA2 0.0000 'DRIFT' DRIF L012 12.1317 'MULTIPOL' QHA2 QUAD 0 .Quad 0.485016E+02 10. 0. 0.5256342158 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0. 6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723 0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0. 6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 2. ! cm MultQHA2 1 0. 0. 0. 'DRIFT' DRIF L031 29.9367 'BEND' DHA2T SBEN 0 .Bend 1.2096161E+02 0.00E+00 7.2121043E-01 0.00 0.00 0.00000000 4 .2401 1.8639 -.5572 .3904 0. 0. 0. 0.00 0.00 0.00000000 4 .2401 1.8639 -.5572 .3904 0. 0. 0. 1.0000E+00 cm Bend 3 0. 0. 0. 'BEND' DHA2Z SBEN 0 .Bend 1.2096161E+02 0.00E+00 7.2121043E-01 0.00 0.00 0.00000000 4 .2401 1.8639 -.5572 .3904 0. 0. 0. 0.00 0.00 0.00000000 4 .2401 1.8639 -.5572 .3904 0. 0. 0. 1.0000E+00 cm Bend 3 0. 0. 0. 'MARKER' LA2E 'END'

**Table 14.6** LA3.inc and LA6.inc optical sequences. These are two of the 4 different files (LA1.inc, LA2.inc, LA3.inc, LA6.inc) that make up the LA1.inc-LA2.inc-LA3.inc-LA2.inc-LA1.inc-LA6.inc-LA1.inc-LA2.inc superA.inc super cell sequence of Booster. These LA\*.inc are subject to INCLUDE in superA.inc data file (Table 14.4)

```
'MARKER' LA3S
'DRIFT' DRIF L057
57.0400
'MULTIPOL' DVCA3 VKIC
0 .kicker
0.1E-03 10.0000 -0.0E+00 0. 0. 0. 0. 0. 0. 0. 0. 0.
.0 .0 1. 0. 0. 0. 0. 0. 0. 0. 0.
4 .1455 2.2670 -.6395 1.1558 0. 0. 0.
.0 .0 1. 0. 0. 0. 0. 0. 0. 0. 0.
4 .1455 2.2670 -.6395 1.1558 0. 0. 0.
1.570796327 0. 0. 0. 0. 0. 0. 0. 0. 0.
#20|3|20 Kick
1 0. 0. 0.
'DRIFT' DRIF L007
6.9600
'MULTIPOL' SVA3 SEXT
0 .Sext
0.1E+02 10. 0. 0. 0.000 0. 0. 0. 0. 0. 0. 0.
0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
2. ! cm MultSVA3
1 0. 0. 0.
'DRIFT' DRIF L014
13.8050
'DRIFT' MONI PUEVA3
0.0000
'DRIFT' DRIF L011
11.6867
'MULTIPOL' QVA3 QUAD
0 .Quad
0.493916E+02 10. 0. -0.5472896982 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
2. ! cm MultQVA3
1 0. 0. 0.
'DRIFT' DRIF L029
29.4917
'DRIFT' DRIF LDHH
121.0000
'MARKER' CAVITY
'DRIFT' DRIF LDHH
121.0000
'MARKER' LA3E
'END'
                                                         'MARKER' LA6S
                                                         'DRIFT' DRIF L057
                                                         57.0400
                                                         'MULTIPOL' DHCA6 HKIC
                                                         0 .kicker
                                                         0.1E-03 10.0000 -0.0E+00 0. 0. 0. 0. 0. 0. 0. 0. 0.
                                                         .0 .0 1. 0. 0. 0. 0. 0. 0. 0. 0.
                                                         4 .1455 2.2670 -.6395 1.1558 0. 0. 0.
                                                         .0 .0 1. 0. 0. 0. 0. 0. 0. 0. 0.
                                                         4 .1455 2.2670 -.6395 1.1558 0. 0. 0.
                                                         0.00 0. 0. 0. 0. 0. 0. 0. 0. 0.
                                                         #20|3|20 Kick
                                                         1 0. 0. 0.
                                                         'DRIFT' DRIF L007
                                                         6.9600
                                                         'MULTIPOL' SHA6 SEXT
                                                         0 .Sext
                                                         0.1E+02 10. 0. 0. 0.000 0. 0. 0. 0. 0. 0. 0.
                                                         0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0
                                                         6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
                                                         0.00 0.00 1.00 0. .0 0. .0 0. .0 0. .0
                                                         6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
                                                         0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
                                                         2. ! cm MultSHA6
                                                         1 0. 0. 0.
                                                         'DRIFT' DRIF L014
                                                         13.8050
                                                         'DRIFT' MONI PUEHA6
                                                         0.0000
                                                         'DRIFT' DRIF L012
                                                         12.1317
                                                         'MULTIPOL' QHA6 QUAD
                                                         0 .Quad
                                                         0.485016E+02 10. 0. 0.5256342158 0. 0. 0. 0. 0. 0. 0. 0.
                                                         0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
                                                         6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
                                                         0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
                                                         6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
                                                         0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
                                                         2. ! cm MultQHA6
                                                         1 0. 0. 0.
                                                         'DRIFT' DRIF L031
                                                         29.9367
                                                         'DRIFT' DRIF LDH
                                                         242.0000
                                                         'MARKER' LA6E
                                                         'END'
```
*Question 14.1.1.2-3*: Check the periodic optical functions (logged in zgoubi.res) against MAD8 results (logged in MAD8 "print" file).

*Question 14.1.1.2-4*: Run a TWISS command (replace MATRIX command in superA.inc) to produce the optical functions along the super cell (TWISS logs these in the file zgoubi.TWISS.out). Produce a graph of the latter, compare to Fig. 14.3 from MAD8.

### **14.1.1.3 Spin Optics**

Injection energy (see Table 14.2) is considered in this question. Tracking is needed in some of the questions, it is performed using the input data file given in Table 14.7, in which, compared to Table 14.4, OBJET[BORO] and SCALING coefficients have

**Table 14.7** Input data file to track 3 helion ions, on-momentum and at *δp/p* = ±10−4, and their spins, along Booster. This data file also defines the [SCALING\_S:SCALING\_E] segment, for INCLUDE purpose—for shortness—in subsequent exercises

```
Track 3 particles and their spin vectors, along superA cell.
! Additional non-void lines here require a comment sign '!'
! Periodic dispersion (from prior lattice parameter computation), for chromatic orbit
! calculation: eta_Y=0.7428, eta'_Y=-0.10475
'OBJET'
0.3074552E3 ! Reference rigidity/kG.cm, for 3He++, at injection beta value 0.0655.
2 ! An option to define initial particle coordinates, one by one.
3 1 ! 3 particles are defined, launched on their closed orbit:
0.742818e-2 -0.10475e-1 0. 0. 0. 1.0001 'p' ! +1e-4 off-momentum (chromatic orbit coord.);
0. .0 0. 0. 0. 1. 'o' ! on-momentum particle (coordinates are zero, D=1);
111
'PARTICUL' ! Defining the particle species is necessary, in order for the program to solve
HELION ! the T-BMT equation.
'SPNTRK' ! Define initial spin vector. Switch on spin tracking.
4
0.866025403784 0. 0.5 ! Initial S_X=S_Z=1/sqrt(2), S_Y=0.
0.707106781187 0. 0.707106781187 ! Initial S_X=S_Z=1/sqrt(2), S_Y=0.
0.5 0. 0.866025403784 ! Initial S_X=S_Z=1/sqrt(2), S_Y=0.
'MARKER' SCALING_S ! A segment, down to "'MARKER' SCALING_E", defined for further INCLUDE.
'SCALING' ! This sets the magnet power supplies, now that the rigidity has been changed
1 5 ! from 1 Tm to 0.3074552 (injection value). This ensures unchanged optics.
BEND
0.3074552
1
MULTIPOL ! Default value for any ULTIPOL, unless otherwise specified furtehr down.
0.3074552
1
MULTIPOL QH* ! These two families, QH* and QV* (* stands for whatever),
0.3074552 * 1.0864492 ! FIT variable #12
1
MULTIPOL QV*
0.3074552 * 1.0657342 ! FIT variable #16
1
MULTIPOL DVCA* ! Make sure all vertical kickers are zero-ed.
0.
1
'MARKER' SCALING_E ! End of [SCALING_S:SCALING_E] segment.
'OPTIONS'
1 1
.plt 2
'INCLUDE'
1
6* superA.inc[superA_S:superA_E] ! INCLUDE superA segment from superA.inc file, 6 times.
'FAISCEAU' ! Particle coordinates, here!
'SPNPRT' ! Print out spin data, at his location along the optical sequence.
'SYSTEM' ! System call.
2 ! 2 successive commands, as follows:
gnuplot <./gnuplot_Zplt_sSpin.gnu ! Produce a graph of spin components versus distance.
okular gnuplot_Zplt_sSpin.eps & ! Display that graph.
'END'
```
been set to injection rigidity, leaving the optics unchanged (cell optical functions as in Fig. 14.3).

*Question 14.1.1.3-1*: The spin closed orbit in the ideal ring (six superA cells, planar, no defects) is vertical everywhere.

Tracking shows that this is also the case for off-momentum particles. Is it what's expected? Please explain.

*Question 14.1.1.3-2*: provide the following simulation: track the spin closed orbit over a turn, for an on-momentum particle, and for off-momentum particles at *dp/p* = −10−<sup>4</sup> and *dp/p* = +10−4. Provide a graph of the spin components for these 3 particles.

Add the computation of the spin matrix to get the 1-turn spin map and the spin tune.

Explain the value of the 1-turn spin precession angle (as found for instance under SPNPRT in zgoubi.res).

*Question 14.1.1.3-3*: What are the spin tune values, on-momentum and at *dp/p* = <sup>±</sup>10−4?

### **14.1.1.4 Depolarizing Resonances**

*Question 14.1.1.4-1*: Begin filling in Tables 14.8 and 14.9, for the moment with the respective locations (*Gγ* values) of

– imperfection resonances,

– systematic intrinsic resonances,

over the energy range of concern (Table 14.2). These data will be used in subsequent questions.


**Table 14.9** Systematic intrinsic resonances; table to be completed. Note: give resonance strengths normalized to the square root of the invariant value


*Question 14.1.1.4-2*: Illustrate the crossing of intrinsic resonances (the strengths of which are *εy*-dependent) with two graphs of Sy*(*G*γ )*, as follows:


Comparing these two graphs, essentially two things are observed: please comment.

*Question 14.1.1.4-3*: Provide a graph showing the span of the magnetic field strengths experienced in the vertical quadrupoles by the orbiting particles, depending on their initial betatron phase.

### **14.1.1.5 Imperfection Resonance Strengths**

Introduce a particular series of random vertical misalignments of the 48 quadrupoles around Booster. ERRORS could be used for that, to randomly modify MUL-TIPOL[KPOS=5] alignment data; however, it is suggested instead to use the misalignment series proposed in Table 14.10, for consistency with the detailed solution to this and subsequent questions given in Sect. 14.2 (Sects. 14.2.1.5 and 14.2.1.7).

A python script amongst other means can be written to apply this series to the six, now distinct, superA, superB, superC, *...*, superF super cells. An example script is shown in Table 14.11 that saves a new include file that contains superA through superF as zgoubi\_misaligned.INC. These modified super\*.inc files will be used in place of the six superA.inc in the previous exercises.

*Question 14.1.1.5-1*: Calculate the strengths of the imperfection resonances excited from |*Gγ* | = 5 to |*Gγ* | = 10, using the theoretical thin lens model (Eq. 2.29).

Hint: produce a zgoubi.TWISS.out file using TWISS command, accounting for the now non-zero vertical closed orbit excursion using FIT (preceding TWISS), to evaluate Eq. 2.29.

Complete the "theory" column of Table 14.8 accordingly.

### **14.1.1.6 Intrinsic Resonance Strengths**

Assume an invariant value equal to the transverse beam emittance (Table 14.3). Use your input file without quadrupole misalignments.

*Question 14.1.1.6-1*: Calculate the strengths of the intrinsic resonances, using the theoretical thin lens model (Eq. 2.35).

**Table 14.10** A possible random vertical misalignments series for the 48 quadrupoles around Booster (this is the data series used in the solutions, Sects. 14.2 and 14.2.1.5). It is now necessary to distinguish the 48 quadrupoles of the six, now distinct, super cells: essentially a matter of renaming each quadrupole, for instance with suffixes A1 to A8 (superA cell), B1 to B8 (superB cell), *...*, F1 to F8 (superF cell)


Hint: use the optical file zgoubi.TWISS.out produced in Sect. 14.1.1.2 to evaluate Eq. 2.35.

Complete the "theory" column of Table 14.9 accordingly.

### **14.1.1.7 Spin Motion Through Imperfection Resonances**

It is suggested here to use the input file with misaligned quadrupoles of Sect. 14.1.1.5 (this is the case for the solutions provided in Sects. 14.2 and 14.2.1.7). *Question 14.1.1.7-1*: Stationary case (fixed energy).

Complete Table 14.8, "stationary" column, by tracking at various distances near resonance, using Eq. 2.49.

*Question 14.1.1.7-2*: Accelerating through the resonance.

CAVITE[IOPT=3] may be used for acceleration.

Complete Table 14.8, "crossing" column, by tracking through every integer resonance from *Gγ* = −5 to *Gγ* = −10.

### **14.1.1.8 Spin Motion Through Intrinsic Resonances**

*Question 14.1.1.8-1*: Stationary case (fixed energy).

Consider one of the strong resonances found in 14.1.1.5.

**Table 14.11** Example python code to modify given .inc files to allow quadrupole misalignments using KPOS=5 and allow these alignments to be based off an external file. The code: reads in existing include files and quadrupole alignment data, parses through them and finds quadrupoles, modifies the quadrupole KPOS line to use KPOS=5 with alignment data from external file, compiles all modified include files, saves a new include file for the entire Booster lattice, zgoubi\_misaligned.INC. Commented lines allow modifying vertical corrector strengths in order to use the harmonic correction method

```
### Python code to parse existing .inc files and change quadrupole alignment to KPOS=5
# Alignments for quadrupoles provided by external file (alignment.txt)
# alignment.text should contain alignment data with a single column, '\n' separated
# To be run in folder with LA1.inc, LA2.inc, LA3.inc, LA6.inc, and alignment.txt
import numpy as np
### Read in lattice files
A1=open('LA1.inc').read()
A2=open('LA2.inc').read()
A3=open('LA3.inc').read()
A6=open('LA6.inc').read().replace("'END'","") #Remove 'END' from cell
### Load in alignment data
Dz=np.loadtxt('alignment.txt')
### Process cell files to insert KPOS5 syntax to Quadrupoles
def insert_KPOS5(line,index):
   temp=line.split('\n') #Split file on new line
   for i in range(0,len(temp)): #Loop through file
       if 'QUAD' in temp[i]: #Mark line if keyword QUAD is used
           idx=i
   temp2=[]
   for i in range(0,len(temp)):
       if i==idx+9: #From QUAD keyword, 9th line after calling keyword is KPOS parameters
           temp2.append("""5 0 0 %.8f 0 0 0 """%(Dz[index]))
       else: #Input line as is if it is not QUAD KPOS line
           temp2.append(temp[i])
   LINE="\n".join(temp2) #Recombine lines into one string
   return LINE
### Set harmonic corrector current based off the harmonic and corrector number
def harm_corr(harmonic_number, corrector_number, phase_shift,currents):
   [corrcalsO,corrcalcO]=currents
   corrector_strength=0.
   for i in harmonic_number:
       phase=2*i*corrector_number*np.pi*8.40729167/201.8+phase_shift
       corrector_strength+=(np.multiply(corrcalsO[i],0.975*1e3*np.sin(phase))+np.multiply(corrcalcO[i],0.975*1e3*np.cos(phase)))
   return corrector_strength
### Modify vertical corrector strengths for harmonic orbit correction
def set_VCorr(line,index,currents):
   temp=line.split('\n')
   for i in range(0,len(temp)):
       if 'VKIC' in temp[i]:
           idx=i
   BCorr=harm_corr(harm_no, index,0,currents)
   temp2=[]
   for i in range(0,len(temp)):
       if i==idx+2:
           temp2.append("""0.100000E-03 10.0000 %.8f 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0"""%(BCorr))
       else:
           temp2.append(temp[i])
   LINE="\n".join(temp2)
   return LINE
### Function to build each Booster superperiod.
def build_super(sindex,line,currents):
   KEY=line.replace('super','') #Get the super period letter from name
   #Set temporary cell with inserting KPOS5
   tA1=insert_KPOS5(A1,sindex*8+0)
# tA1=set_VCorr(tA1,sindex*8/2+0,currents) #Modify vertical corrector strengths to desired harmonic correction
   #Replace all names to have correct superperiod letter and cell number
   L1=tA1.replace("DVCA1",'DVC%s1'%KEY).replace("SVA1",'SV%s1'%KEY).replace("QVA1",'QV%s1'%KEY).replace("DHA1",'DH%s1'%KEY)
   #Repeat for each cell
   tA2=insert_KPOS5(A2,sindex*8+1);
   L2=tA2.replace("DHCA2",'DHC%s2'%KEY).replace("SHA2",'SH%s2'%KEY).replace("QHA2",'QH%s2'%KEY).replace("DHA2",'DH%s2'%KEY)
   tA3=insert_KPOS5(A3,sindex*8+2); # tA3=set_VCorr(tA3,sindex*8/2+1,currents)
   L3=tA3.replace("DVCA3",'DVC%s3'%KEY).replace("SVA3",'SV%s3'%KEY).replace("QVA3",'QV%s3'%KEY)
   tA4=insert_KPOS5(A2,sindex*8+3);
   L4=tA4.replace("DHCA2",'DHC%s4'%KEY).replace("SHA2",'SH%s4'%KEY).replace("QHA2",'QH%s4'%KEY).replace("DHA2",'DH%s4'%KEY)
   tA5=insert_KPOS5(A1,sindex*8+4); # tA5=set_VCorr(tA5,sindex*8/2+1,currents)
   L5=tA5.replace("DVCA1",'DVC%s5'%KEY).replace("SVA1",'SV%s5'%KEY).replace("QVA1",'QV%s5'%KEY).replace("DHA1",'DH%s5'%KEY)
   tA6=insert_KPOS5(A6,sindex*8+5);
   L6=tA6.replace("DHCA6",'DHC%s6'%KEY).replace("SHA6",'SH%s6'%KEY).replace("QHA6",'QH%s6'%KEY)
   tA7=insert_KPOS5(A1,sindex*8+6); # tA7=set_VCorr(tA7,sindex*8/2+1,currents)
   L7=tA7.replace("DVCA1",'DVC%s7'%KEY).replace("SVA1",'SV%s7'%KEY).replace("QVA1",'QV%s7'%KEY).replace("DHA1",'DH%s7'%KEY)
   tA8=insert_KPOS5(A2,sindex*8+7);
   L8=tA8.replace("DHCA2",'DHC%s8'%KEY).replace("SHA2",'SH%s8'%KEY).replace("QHA2",'QH%s8'%KEY).replace("DHA2",'DH%s8'%KEY)
```
(continued)

### **Table 14.11** (continued)

```
#Add strings together line to build new include files
    RETURN="""
%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s"""%(L1,L2,L3,L4,L5,L6,L7,L8)
    return RETURN
### Function to execute zgoubi based off desired snake rotation angle, phi
def Generate_INC():
    #Build the superperiods
    Asuper=build_super(0,"Asuper",'')
    Bsuper=build_super(1,"Bsuper",'')
    Csuper=build_super(2,"Csuper",'')
    Dsuper=build_super(3,"Dsuper",'')
    Esuper=build_super(4,"Esuper",'')
    Fsuper=build_super(5,"Fsuper",'')
    DAT_file=("'MARKER' START \n%s\n%s\n%s\n%s\n%s\n%s\n'MARKER' END"%(Asuper,Bsuper,Csuper,Dsuper,Esuper,Fsuper))
    DATA=open('zgoubi_misaligned.INC','w')
    DATA.write('%s'%DAT_file)
    DATA.close()
#Build and save new include file using KPOS=5 in quadrupoles
Generate_INC()
```
For various distances to the resonance (say, *n* = *N* ×|*n*|, N is a small integer), produce a graph of the motion of the spin components *Sx,s,y(*turn*)*, over a few hundred turns—assume vertical initial spin vector orientation for simplicity.

Produce a Fourier spectrum of the horizontal components (Fourier amplitude versus frac(*ν*sp)); explain the frequency components observed in the spectrum.

Produce tables, or graphs, which compare theory with the following results:


*Question 14.1.1.8-2*: Complete Table 14.9, "stationary" column, by tracking at various distances near the resonance, using Eq. 2.49.

*Question 14.1.1.8-3*: Accelerating through the resonance.

CAVITE[IOPT=3] may be used for acceleration.

Consider the strong resonance of Question 14.1.1.8-1.

Deduce the resonance strength from the Froissart-Stora formula; check against the theoretical value obtained in Question 14.1.1.6-1 and against the numerical value(s) in Question 14.1.1.8-2.

*Question 14.1.1.8-4*: Complete Table 14.9, "crossing" column, by tracking through every systematic intrinsic resonance.

### **14.1.1.9 Spin Motion Through a Weak Resonance**

Consider a weak intrinsic resonance (take for instance a random one, or otherwise a systematic with a small enough invariant value), such that *Pf* ≈ 0*.*99 *Pi*.

*Question 14.1.1.9-1*: Compute the turn-by-turn spin motion Sy*(*turn*)* across that resonance, produce Sy*(*turn*)* graph.

Match that spin motion Sy*(*turn*)* with the Fresnel integral model. From this match, obtain the resonant *Gγ* value, vertical tune, and resonance strength.

### **14.1.1.10 Beam Depolarization Using a Solenoid**

Depolarization of the beam while it is still in the accelerator may be a method for calibrations. A longitudinal field can be introduced locally in the lattice for that. Depolarization is obtained by crossing an integer resonance. This is the object of the present simulation.

*Question 14.1.1.10-1*: Introduce a *L* = 1 meter solenoid, field *Bs* (SOLENOID may be used for that, or a 1-D axial field map using BREVOL), in a straight section in the defect free Booster lattice.

Determine *Bs* from theory for proper value of the strength |*n*| of an appropriate integer resonance. Plot *Pf (BsL)*.

Accelerate (using CAVITE[IOPT=3]) a particle with vertical initial spin through that resonance, check that spin motion ends up in the vicinity of the median plane, asymptotically.

Repeat the simulation using SPINR, a pure spin rotation, in lieu of SOLENOID. *Question 14.1.1.10-2*: Check depolarization of a beam with Gaussian coordinate distributions in transverse coordinates and momentum spread, with the following parameters:

$$
\varepsilon\_{\chi} = \varepsilon\_{\chi} = 1 \,\,\pi \,\,\mu m, \qquad \sigma\_{\frac{\delta \rho}{\rho}} = 10^{-3}
$$

### **14.1.1.11 Introduce a Partial Snake**

A partial Siberian snake makes imperfection resonances strong, so causing complete adiabatic spin flip at every imperfection resonance crossing (Chap. 1). The forbidden spin tune band it induces near integer *Gγ* allows for placing the fractional part of the vertical betatron tune inside this gap, so forbidding crossing of intrinsic resonances *ν*sp = *n* ± *νy* .

The goal in this exercise is to assess the efficiency of a partial snake in overcoming integer resonances, and the necessary partial snake strength for preservation of polarization during acceleration.

*Question 14.1.1.11-1*: Create a vertical closed orbit around Booster lattice. This can use ERRORS to generate random vertical misalignment of lattice quadrupoles (this is the case for the solutions provided in Sects. 14.2 and 14.2.1.11; another possibility would be to re-use the input file with misaligned quadrupoles of Sect. 14.1.1.5). Only one ring optics, meaning a single set of quadrupole misalignments is considered in the exercise, as it mostly aims at addressing principles (it is not intended to perform statistics on misalignment samples).

Calculate the strengths of the spin resonances so excited.

Accelerate a particle on the vertical closed orbit, over *Gγ* : −6*.*5 → −10*.*5, provide a graph of Sy*(*turn*)*.

Check the location and spacing of the resonances, confirm theoretical expectations.

*Question 14.1.1.11-2*: Install in a drift a longitudinal-axis partial snake (use SPINR for pure spin rotation, avoiding any orbit and optics perturbation).

Inhibit ERRORS (ERRORS[ONF=0]) and set the snake angle to *φ*snake = 2*π*|*J n*|, with |*J n*| being the strength of the strongest resonance.

Set the lattice rigidity on *Gγn* = 7 resonance. Find the spin closed orbit for an on-momentum particle. Plot the spin orbit components around the ring, *Sx,y,s(s)*. Explain what is observed.

*Question 14.1.1.11-3*: Still in the case of a perfect ring, planar closed orbit, compute the *Gγ* dependence of the spin closed orbit vector, observed at the snake. Produce a graph of the spin orbit components *S*x*,*s*,*y*(Gγ )*.

Produce a graph of the spin tune dependence on *Gγ* , *ν*sp*(Gγ )*.

*Question 14.1.1.11-4*: Add quadrupole misalignments now (ERRORS[ONF=1]). Thus, spin-wise, both effects now apply, a vertical closed orbit distortion and local spin rotation by a snake (SPINR[*φ*snake = 1*.*224◦]).

Accelerate a particle on the vertical closed orbit, over *Gγ* : −6*.*5 → −10*.*5, provide a graph of Sy*(*turn*)*. Explain what is observed.

*Question 14.1.1.11-5*: Increase the spin precession in the snake in steps, observe how it affects spin rotation, confirm theoretical expectations.

Justify a minimal spin precession by the snake for spin flip upon resonance crossing.

### **14.1.1.12 Introduce Full Snakes**

Imperfection resonance strengths increase in proportion to *γ* , thus full Siberian snakes are used at high energy, in order to overcome integer resonances (Chap 1). A full Snake maintains the stable spin precession direction unperturbed as long as the spin rotation it causes (its strength) is much larger than the spin rotation due to the resonance driving fields (Chap. 1).

Based on the previous exercises, set lattice and beam input data in the following way:


*Question 14.1.1.12-1*: Compute spin closed orbit and spin tune. Compute spin orientation at opposite azimuth (*Δθ* = 180◦) to the snake.

Repeat for *dp/p* <sup>=</sup> <sup>10</sup>−<sup>4</sup> beam momentum offset.

Which parameters depend on the energy and which do not? Check against expectation from theory.

*Question 14.1.1.12-2*: Accelerate over *Gγ* : −6*.*5 → −13*.*5. Is there any polarization loss?

*Question 14.1.1.12-3*: Now use a horizontal emittance as large as the vertical one. Accelerate over *Gγ* : −6*.*5 → −13*.*5. Is there any polarization loss?

*Question 14.1.1.12-4*: Add a second snake, at proper location and with proper axis orientation to obtain a spin tune of 0.5 independent of beam energy.

Compute the spin closed orbit around the ring. How is it different from the single snake case?

Compute the spin closed orbit and spin tune for *dp/p* <sup>=</sup> <sup>10</sup>−<sup>4</sup> beam momentum offset. Compare with on-momentum parameters, check against expectation from theory.

Accelerate a beam over *Gγ* : −6*.*5 → −13*.*5. Is there any polarization loss?

### **14.1.1.13 High Order Snake Resonances**

Set the vertical beam emittance to a value which is large enough to create polarization losses at one or more intrinsic resonances. Introduce a random closed orbit distortion sufficiently large that some imperfection resonances create polarization loss during acceleration. Use the lattice with two snakes. Select the snake axes such that a condition for 2nd order snake resonance with the vertical betatron tune is satisfied.

*Question 14.1.1.13-1*: Accelerate over *Gγ* : −6*.*5 → −13*.*5, produce a graph of *Sy (*turn*)* .

Remove the closed orbit distortion, repeat the acceleration cycle, produce a graph of *Sy (*turn*)* .

Compare the results, explain the difference in the polarization loss between the cases with and without the closed orbit distortion.

*Question 14.1.1.13-1*: Select the snake axes orientation such that a condition for 3rd order snake resonance with vertical betatron tune is satisfied.

Accelerate over *Gγ* : −6*.*5 → −13*.*5, produce a graph of *Sy (*turn*)* . Is there polarization loss? Explain the difference in the polarization loss between 2nd and 3rd order resonances.

### **14.1.1.14 Harmonic Orbit Correction**

Using the quadrupole alignment data, perform a harmonic scan for both a strong and a weak imperfection resonance found in Question 14.1.1.5-1. Each corrector magnet is 10 cm long, has an excitation of 9.75 G/A, and a maximum corrector current of 25 A. Power the corrector magnets according to:

$$B\_{j,h} = a\_h \sin(h\theta\_j) + b\_h \cos(h\theta\_j) \tag{14.1}$$

where j is the corrector number, *θj* is the location in the ring, *ah* and *bh* are the amplitudes for harmonic h. Provide the resulting *Pf* data and fit it with a Gaussian to find *Ic,*<sup>0</sup> and *Is,*0, and the associated *σs* and *σc* values.

At each of the resonances, is it more reasonable to correct the harmonics or exacerbate them?

How accurate must the harmonic corrector currents of the two families be to have a *<* 1% polarization loss at each of the resonances?

Track particles through the two imperfection resonances with your desired corrector current. What is the polarization loss through the two resonances?

### **14.1.1.15 Preserve Polarization Using Tune-Jump**

When particles encounter a resonance, if the crossing speed is fast enough, the spin will not be disturbed by the resonance and the polarization will be preserved. The acceleration speed is limited by the RF system and magnet ramping rate, so fast crossing speed needs to come from another method.

The tune jump technique uses dedicated quadrupoles to cause a swift tune change *dνy dθ* , so increasing the resonance crossing speed according to

$$
\alpha = \frac{dG\chi}{d\theta} \pm \frac{d\upsilon\_\circ}{d\theta},\tag{14.2}
$$

The |*Gγ* | = 0 + *νy* resonance is considered in this exercise, to simulate the fast tune jump method as sketched in Fig. 14.4. Booster simulation input data files of Sect. 14.1.1.2 (Tables 14.4, 14.5, 14.6, and 14.7) will be used in the following questions, possibly modified as needed.

*Question 14.1.1.15-1*: No tune-jump setting of the quadrupoles in this first question, perfect Booster ring optics is considered.

Take an RF cavity voltage of 100 kV (30◦ synchronous phase) so an appreciable depolarization can be observed. What is the expected value of *dGγ dθ* with this RF setting?

Take *Bρ* = 2*.*12998742 at the start of the tracking, upstream of the resonance (i.e., |*Gγ* | = 4*.*59646969, 276.7452 MeV kinetic energy). Calculate what turn *N*0+*νy* the resonance is located at.

Consider a particle on *εy* <sup>=</sup> <sup>1</sup>*.*<sup>864</sup> <sup>×</sup> <sup>10</sup>−<sup>7</sup> *<sup>π</sup>*m vertical invariant. Assume spin initially vertically aligned. What is the expected asymptotic polarization value, *Pf* , upon crossing of this resonance?

Run a numerical simulation of this resonance crossing. Note: SCALING in Table 14.12 can be used by simply changing the data under "MULTIPOL QV" so to recover constant tunes *νx* = 4*.*73, *νy* = 4*.*82 all the way (as in earlier exercises).

*Question 14.1.1.15-2*: Change the SCALING input parameters so the setpoint of vertical quadrupoles (labeled QV\*) begins to change at turn *N*0+*νy* -50 and continues to *N*0+*νy*+50 with a total change of -5%. Set the change to return the nominal vertical quadrupole field value at turn *N*0+*νy*+1050. These SCALING settings are detailed in Table 14.12.

What is the new crossing speed with this tune-jump setting of the vertical quadrupoles?

Calculate the expected *Pf* given the resonance strength and the new crossing speed. Does this agree with the value from the simulation?

**Table 14.12** Detailed setting of SCALING for tune jump simulation. Compared to earlier exercises, the change essentially concerns the vertical quadrupole scaling data, namely under "MULTIPOL QV\*", with SCALING[NT=5], which indicates that a series of 5 different scaling coefficient values follow (the data line following NT) at 5 different timings (shown on the next data line in units of the turn number)

```
'SCALING' ! This sets the power supplies for unchenged optics,
1 7 ! given a reference rigidity OBJET[BORO=2.12998742e3].
BEND
2.12998742
1
MULTIPOL
2.12998742
1
MULTIPOL QH* ! These two families, QH* and QV* (* stands for whatever suffix),
2.12998742 * 1.0864492
1
MULTIPOL QV* ! QV* quadrupole family field changes to cause tune jump in the
5 ! vicinity of the resonance.
2.27000043 2.81833569 2.832133844842106 3.51572336 3.81685555
0 1400 1600 3500 4503
MULTIPOL SH* ! Chromaticies may be controlled, via these two sextupoles
2.12998742
1
MULTIPOL SV*
2.12998742
1
MULTIPOL DVCA* ! Make sure all vertical kickers are zero-ed.
2.12998742
1
```
### **14.1.1.16 Preserve Polarization Using an AC Dipole**

An AC dipole can preserve polarization through intrinsic resonances by driving large amplitude vertical betatron oscillations of the entire bunch. This is done with a horizontal magnetic field that oscillates in phase with the vertical motion of the particles. The amplitude of the driven oscillations, *Ycoh*, follows (Eq. 5.11)

$$Y\_{coh} = \frac{B\_m L}{4\pi \, B\rho \, \delta\_m} \beta\_N$$

where *BmL* is the integrated field of the AC dipole magnet, *βy* is the beta function at the AC dipole and *Bρ* is the bunch rigidity.

For simulation purposes, create a copy of superA.inc Booster superperiod (Table 14.4), which will be called superA2.inc in the following, in which a new halfcell is used, LA32.inc, a copy of LA3.inc (Table 14.6). In LA32.inc, the long drift section now includes a 1 kG, 0.5 m vertical dipole, simulated using MULTIPOL, labeled 'ACD'.

The SCALING command in superA.inc, in addition, uses the option NT=-88 for that 'MULTIPOL ACD' element of the optical sequence, so to define it as an AC dipole. The format for option NT=-88 is:

MULTIPOL ACD -88 0 0.19 0.19 12.2 100 700 1300 700

The first line following NT=-88 specifies the AC dipole phase offset, the AC dipole tune Q1 at the start of the sweep, tune Q2 at the end of the sweep, and a scaling factor to be applied to the magnet field. The next line specifies the duration of these steps, namely, *Nin* =hold duration (field held at zero), *Nup* =ramp up, *Nflat* =plateau, *Ndown* =ramp down.

Set Q1=Q2=(1-frac(*νy*+0.01))

Use OBJET[KOBJ=2] to create a set of 32 particles with the following coordinates to represent a bunch with RMS size [9]:

$$\mathbf{y} = A\_n \mathbf{C} \cos(j\pi/4) \tag{14.3}$$

and

$$\mathbf{y}' = A\_n \mathbf{C} \sin(j\pi/4) \tag{14.4}$$

for j ∈ {0*,* 1*,* 2*,...,* 7}, C ∈ {−0*.*2671*,* −0*.*94*,* −1*.*9617*,* −4*.*1589} and *An* an amplitude factor.

*Question 14.1.1.16-1*: Track particles across the |*Gγ* | = 0+*νy* with AC dipole field scaling factor set to 0.0. Does *Pf* with the 32 particles equal *Pf* value obtained with a single particle at the RMS amplitude?

*Question 14.1.1.16-2*: Set the scale factor to 10 G and track particles again. What is the value of *Pf* ?

Determine what field is needed to get spin-flip from 100% to −99%.

### **14.1.1.17 Acceleration of a Polarized 6D Bunch**

In this question, a simulation of the acceleration of a 100-particle bunch from *Gγ* = −5*.*5 to *Gγ* = −13*.*5 is set up and run.

The lattice is the same as before, lattice and acceleration parameters are taken from Table 14.2. Bunch parameters are taken from Table 14.3.

Synchrotron motion in the bunch is accounted for in this simulation: use CAVITE [IOPT=2].

Install selected polarization preservation measures based on the previous questions, in order to maximize polarization transmission through the resonances present in that energy range.

In performing the following, comment on the results obtained in regard to expectations, justify results based on theoretical expectations.

From tracking output data (logged turn-by-turn in zgoubi.fai), produce graphs of


over the acceleration range.

Produce histograms of the 6 beam coordinates at the top energy. Produce the spin component densities at the top energy. Hint: use HISTO; it is possible to plot from zgoubi.HISTO.out—this requires HISTO[PRINT]. Zpop can be used as well by reading the data from zgoubi.fai.

# *14.1.2 Electron Spin Dynamics, Synchrotron Radiation*

The AGS Booster ring is utilized for the exploration of electron polarization. The optical functions of one super cell are displayed in Fig. 14.3, as described in Sect. 14.1.1.1. The electron beam energy is chosen at a relatively high energy of 10 GeV in order to have the beam reach the equilibrium in a short simulation time. The polarization is evaluated after a few damping times. There are three assignments for the electron polarization studies:


In this study, we will be mainly using somewhat modified versions of the input files [10] that were introduced in Sect. 14.1.1.2 and subsequent sections. Note that,

• moving from helions to electrons simulation is essentially a matter of changing the reference rigidity (OBJET[BORO] or MCOBJET[BORO]) and the nature of **Table 14.13** Left: Zgoubi code producing a table of the optical functions zgoubi.TWISS.out. Right: the scaling\_10GeVel.inc INCLUDE file, also used in subsequent exercises. The superA.inc INCLUDE file, which defines the Booster ring optical sequence is given in Table 14.4, it describes one of the six booster super-cells

```
Twiss parameters
'OBJET'
33.3564095089e3 ! 10cGeV E_k+M e- or e+.
5
.01 .001 .01 .001 0. .001
0. 0. 0. 0. 0. 1.
'PARTICUL' ! e+, not e-, is stated here, as the optics
POSITRON ! was initially set for positive charge (3He2+).
'SPNTRK'
3
'SRLOSS'
0 ! SR loss on or off (1/0).
BEND ! BENDs only are concerned.
1 123456
'INCLUDE'
1
scaling_10GeVel.inc[SCALING_S:SCALING_E]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'TWISS'
2 1. 1.
'SYSTEM'
1
gnuplot <./ gnuplot_TWISS.gnu
'END'
                                                            ! scaling_10GeVel.inc INCLUDE file.
                                                            'MARKER' SCALING_S
                                                            'SCALING'
                                                            1 6
                                                            BEND
                                                            -1
                                                            33.3564095089
                                                            1
                                                            MULTIPOL
                                                            -1
                                                            33.3564095089* 1.
                                                            1
                                                            MULTIPOL QH* ! Quadrupoles set for Qx=4.73, Qy=4.82.
                                                            -1
                                                            33.3564095089* 1.0864799 ! FIT variable #12.
                                                            1
                                                            MULTIPOL QV*
                                                            -1
                                                            33.3564095089* 1.0657626 ! FIT variable #16.
                                                            1
                                                            MULTIPOL SH*
                                                            -1
                                                            33.3564095089
                                                            1
                                                            MULTIPOL SV*
                                                            -1
                                                            33.3564095089
                                                            1
                                                            'MARKER' SCALING_E
                                                            'END'
```
the particle (PARTICUL[ELECTRON], from PARTICUL[HELION]). To avoid having to change the polarities of the magnetic fields in the AGS Booster that are designed for the positively charged particles and thus simplify the set-up of the simulation, we use PARTICUL[POSITRON];


### **14.1.2.1 Electron Equilibrium Emittances and Energy Spread**

When injected into storage ring, an electron bunch, if unmatched, will eventually reach equilibrium emittances, under the effect of synchrotron radiation (SR). This is the effect addressed in these simulation exercises.

The electron equilibrium emittances and damping rates can be calculated analytically, as discussed in Chap. 6, using the Twiss and dispersion parameters of the linear optics design. These damping parameters in a circular accelerator or in a storage ring can also be obtained from a particle tracking simulation.

### **Table 14.14** Gnuplot script for plotting the optics and orbit results from zgoubi.TWISS.out

```
set title "Optical functions, from zgoubi.TWISS.out" font "roman,16"
set xlabel "s [m]" font "roman,16"
set ylabel "{/Symbol b}_x, {/Symbol b}_y [m]" font "roman,13"
set y2label "{/Symbol h}_x, {/Symbol h}_y" font "roman,13"
set xtics font "roman,12" nomirror
set x2tics font "roman,12" mirror
set ytics font "roman,12" nomirror
set y2tics font "roman,12" nomirror
set key t c maxrows 1 width 4
set key font "roman, 14" samplen 1
set xrange []
set x2range []
set yrange []
set y2range []
plot \
     "zgoubi.TWISS.out" u ($13):($2) axes x1y1 w l lt 1 lc rgb "red" lw 1. tit "{/Symbol b}_x" ,\
     "zgoubi.TWISS.out" u ($13):($4) axes x1y1 w l lt 1 lc rgb "blue" lw 1. tit "{/Symbol b}_y" ,\
     "zgoubi.TWISS.out" u ($13):($7) axes x1y2 w l lt 1 lc rgb "black" lw 1. tit "{/Symbol h}_x" ,\
     "zgoubi.TWISS.out" u ($13):($9) axes x1y2 w l lt 2 lc rgb "green" lw 1. tit "{/Symbol h}_y"
set samples 10000
set terminal postscript eps blacktext color enh size 8.3cm,5cm "Times-Roman" 12
set output "gnuplot_TWISS_btxy.eps"
replot
set terminal X11
unset output
pause 2
set title "Orbit, from zgoubi.TWISS.out" font "roman,16"
set ylabel "x, y [m]" font "roman,13"
set y2label "x, y [m]" font "roman,13"
unset x2tics
set xtics font "roman,12" mirror
unset y2tics
set ytics font "roman,12" mirror
plot \
     "zgoubi.TWISS.out" u ($13):($15) axes x1y1 w l lt 1 lc rgb "red" tit "x" ,\
     "zgoubi.TWISS.out" u ($13):($17) axes x1y1 w l lt 1 lc rgb "blue" tit "y"
set samples 10000
set terminal postscript eps blacktext color enh size 9.3cm,6cm "Times-Roman" 12
set output "gnuplot_TWISS_xy.eps"
replot
set terminal X11
unset output
pause 2
exit
```
*Question 14.1.2.1-1*: Run the Zgoubi code in Table 14.13 to generate a table of the optical functions of the entire AGS Booster ring, zgoubi.TWISS.out. Generate graphs of the optics and orbit using the Gnuplot script in Table 14.14. Apply the expressions given in Chap. 6 to calculate the damped equilibrium emittances, energy spread and damping times of 10 GeV electrons for the optics tabulated in zgoubi.TWISS.out. Fill out Table 14.15 with your results.

*Question 14.1.2.1-2*: Run the code in Table 14.16. Obtain the energy loss from zgoubi.res for the electron beam energy at 10 GeV and compare it with the analytical calculation in Table 14.15. Use the energy loss to obtain the RF voltage for the RF in Table 14.15. Compare your result with the CAVITE element setting in Table 14.17.


**Table 14.16** Zgoubi code for calculating the energy loss per turn. Recall: the scaling\_10GeVel.inc file is given in Table 14.13

Energy spread

```
Energy loss per turn.
'OBJET'
33.3564095089e3 10GeV E_k+M electron.
1
10000 1 1 1 1 1
0.0 0.0 0.0 0.0 0.00 0.0
0.000 0.000 0.000 0.000 0.00 1.
'PARTICUL'
POSITRON
'SPNTRK'
3
'SRLOSS'
1
BEND
1 123456
'FAISTORE'
zgoubi.fai
1
'INCLUDE'
1
scaling_10GeVel.inc[SCALING_S:SCALING_E]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'FAISCEAU'
'SRPRNT'
'END'
```
*Question 14.1.2.1-3*: Examine the initial beam setup in Table 14.17. Check whether the initial beam distribution is matched transversely by comparing the beam setup parameters with the periodic Twiss functions in zgoubi.TWISS.out you obtained earlier. Run the code in Table 14.17 with 100 particles up to 1000 turns with synchrotron radiation enabled. Use the Gnuplot script in Table 14.18 (or a code of your own) to obtain the rms vertical beam size *σy* as a function of the turn number from the Zgoubi output zgoubi.fai file. Using the Gnuplot script in Table 14.19, **Table 14.17** Zgoubi code for simulating the beam dynamics with synchrotron radiation

```
Beam dynamics with synchrotron radiation.
'OBJET'
33.3564095089e3 10GeV E_k+M electron.
8
0 100 0
0.0006 -0.00065 0. 0. 0.00 1.00315000
0.98253425 5.4881122 0
1. 1. 0.
'PARTICUL'
POSITRON
'SPNTRK'
3
'SRLOSS'
1
BEND
1 123456
'FAISTORE'
zgoubi.fai
10 ! Log to zgoubi.fai every 10 turn.
'OPTIONS'
1 1 ! Inhibit writes to zgoubi.res:
WRITE OFF ! this saves on CPU time.
'INCLUDE'
1
scaling_10GeVel.inc[SCALING_S:SCALING_E]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'CAVITE'
2
201.780049 100 ! orbit length, h.
122345.25e3 2.61799387799 ! volts, phi_s rad.
'REBELOTE'
999 0.1 99 ! 999 additional passes.
'OPTIONS'
0 1
WRITE ON ! Re-establish writes to zgoubi.res.
'FAISCEAU' ! Print out particle coordinates.
'SPNPRT' ! Print out spin coordinates.
'SRPRNT' ! Print out SR data.
'END'
```
calculate the vertical rms emittance from the vertical rms beam size and optics parameters, plot evolution of the vertical emittance, and extract the vertical damping time by fitting the data to an exponential. Compare the obtained vertical damping time to the theoretical value in Table 14.15.

### **14.1.2.2 Spin Diffusion Studies**

Synchrotron radiation causes spin-flip through the Sokolov-Ternov effect, and spin diffusion. These effects determine the evolution of polarization, and polarization life time (Sects. 6.3 and 6.5). The evaluation of spin diffusion in general requires numerical simulations, which allow deriving the polarization life-time.

Spin diffusion, i.e. depolarization, of polarized electrons can be suppressed and mitigated through the design of an accelerator and proper correction schemes. Alternatively, spin diffusion can also be enhanced if the design or the correction

```
set fit logfile '/dev/null'
fname="zgoubi.fai"
f(x)=ave
set print "ave_sig.txt"
do for [z=10:1000:10] {
  FIT_STDFIT=0
  fit f(x) fname u 38:(($38==z)?($1==1?$9:1/0):1/0) via ave
  d_ave=ave
  d_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:(($38==z)?($1==1?$10:1/0):1/0) via ave
  x_ave=ave
  x_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:(($38==z)?($1==1?$11:1/0):1/0) via ave
  xp_ave=ave
  xp_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:(($38==z)?($1==1?$12:1/0):1/0) via ave
  y_ave=ave
  y_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:(($38==z)?($1==1?$13:1/0):1/0) via ave
  yp_ave=ave
  yp_sig=FIT_STDFIT
  print z,d_ave,d_sig,x_ave,x_sig,xp_ave,xp_sig,y_ave,y_sig,yp_ave,yp_sig
}
unset print
exit
```
### **Table 14.18** Gnuplot script for calculating the rms beam parameters

### **Table 14.19** Gnuplot script for plotting and fitting the vertical emittance data

```
set term postscript eps enhanced color size 9.3cm,6cm "Times-Roman" 12
set output "damping_time_y.eps"
set grid
set size 1.0,1.0
set xlabel "Turns [x10^{3}]"
set ylabel "{/Symbol e}_{y} [{/Symbol m}m]"
unset key
A=1
B = 0.175
C=0
f(x)=A*exp(-x/B)
fit f(x) "./ave_sig.txt" u ($1/1000):($1>0?($9**2*0.01**2/9.6995264*1e6):1/0) via A,B
plot "./ave_sig.txt" u ($1/1000):($1>0?($9**2*0.01**2/9.6995264*1e6):1/0) w l lc rgb 'red' lw 1.5,\
f(x) lc rgb 'blue' lw 1.5
exit
```
schemes are not done properly. In this exercise, we explore how and how fast spin diffusion happens when **n**<sup>0</sup> changes. We will also demonstrate how spin diffusion can be suppressed by adjustment of the magnet layout and beam optics.

### **14.1.2.3 Spin Diffusion**

*Question 14.1.2.2-1*: Run the code in Table 14.20 to obtain **n**<sup>0</sup> at the start point of the ideal lattice. This is done by tracking three electrons with spins aligned along three orthogonal directions with synchrotron radiation disabled. Find the spin transfer matrix and precession axis (i.e. **n**0) in zgoubi.res file.

*Question 14.1.2.2-2*: Set the initial spins of 100 electrons to be aligned with the **n**<sup>0</sup> axis of the ideal lattice. Enable synchrotron radiation. Track the particles by running the code in Table 14.21. Calculate the average spin, or polarization, of the electrons using the script in Table 14.22. Plot the polarization as a function of the turn number and extract the spin diffusion rate by fitting the data. Refer to Table 14.23.

*Question 14.1.2.2-3*: Offset the first "QVA1" quadrupole from the start of the lattice by 0.1 cm as shown in Table 14.24 and find the resulting closed orbit using the "FIT2" procedure given in Table 14.25. Make sure that SRLOSS is disabled. The

**Table 14.20** Zgoubi code for obtaining **n**<sup>0</sup> at the start point of the ideal lattice

```
$\vecbold{n}_0$ at the start point of the ideal lattice.
'OBJET'
33.3564095089e3 10GeV E_k+M electron.
1
3 11111
0. 0. 0. 0. 0.00 0.
0.00 0.00 0.00 0.00 0.00 1.
'PARTICUL'
POSITRON
'SPNTRK'
4
1. 0. 0.
0. 1. 0.
0. 0. 1.
'SRLOSS'
0
BEND
1 123456
'OPTIONS'
1 1
WRITE OFF
'INCLUDE'
1
scaling_10GeVel.inc[SCALING_S:SCALING_E]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'OPTIONS'
1 1
WRITE ON
'SPNPRT' MATRIX
'END'
```

```
Electron polarization with synchrotron radiation
'OBJET'
33.3564095089e3 10GeV E_k+M electron.
1
100 1 1 1 1 1
0. 0. 0. 0. 0.00 0.
0.00 0.00 0.00 0.00 0.00 1.
'PARTICUL'
POSITRON
'SPNTRK'
3 ! All initial spins vertical.
'SRLOSS'
1
BEND
1 123456
'FAISTORE'
zgoubi.fai
10 ! Log to zgoubi.fai every 10 turn.
'OPTIONS'
1 1
WRITE OFF
'INCLUDE'
1
scaling_10GeVel.inc[SCALING_S:SCALING_E]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'OPTIONS'
0 1
WRITE ON
'CAVITE'
2
201.780049 100 ! orbit length, h.
122345.25e3 2.61799387799 ! volts, phi_s rad.
'REBELOTE'
999 0.1 99
'END'
```
### **Table 14.21** Zgoubi code for tracking electron polarization with synchrotron radiation enabled

output is saved in the zgoubi.FIT.out.dat. Obtain the **n**<sup>0</sup> axis by specifying the closed orbit offset at the start of the lattice. Launch 100 electrons along the perturbed closed orbit following the initial beam setup provided in Table 14.26 and track them for 1000 turns with synchrotron radiation enabled. Find the average polarization as a function of the turn number, plot it, and extract the spin diffusion rate as in Question 14.1.2.2-2.

*Question 14.1.2.2-4*: Repeat the calculation in Question 14.1.2.2-3 and obtain the **n**<sup>0</sup> vectors and the spin diffusion rates with the quadrupole "QVA1" offset by 0.2 and 0.5 cm. Explain your results.

### **14.1.2.4 Suppression of Spin Diffusion**

We will next illustrate how the spin diffusion can be mitigated by changing the polarities of magnetic fields.

**Table 14.22** Gnuplot script for calculating the polarization

```
set fit logfile '/dev/null'
fname="zgoubi.fai"
f(x)=ave
set print "ave_pol_align.txt"
do for [z=1:1:1] {
  FIT_STDFIT=0
  fit f(x) fname u 38:($38==z?($1==1?$20:1/0):1/0) via ave
  px_ave=ave
  px_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:($38==z?($1==1?$21:1/0):1/0) via ave
  py_ave=ave
  py_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:($38==z?($1==1?$22:1/0):1/0) via ave
  pz_ave=ave
  pz_sig=FIT_STDFIT
  print z,px_ave,px_sig,py_ave,py_sig,pz_ave,pz_sig
}
do for [z=10:1000:10] {
  FIT_STDFIT=0
  fit f(x) fname u 38:($38==z?($1==1?$20:1/0):1/0) via ave
  px_ave=ave
  px_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:($38==z?($1==1?$21:1/0):1/0) via ave
  py_ave=ave
  py_sig=FIT_STDFIT
  FIT_STDFIT=0
  fit f(x) fname u 38:($38==z?($1==1?$22:1/0):1/0) via ave
  pz_ave=ave
  pz_sig=FIT_STDFIT
  print z,px_ave,px_sig,py_ave,py_sig,pz_ave,pz_sig
}
unset print
exit
```
*Question 14.1.2.2-5*: Compare the magnet layouts in Tables 14.27 and 14.28 and describe spin rotations in the two layouts assuming vertical initial spin direction.

*Question 14.1.2.2-6*: Run the codes in Tables 14.27 and 14.28 and plot the magnetic fields and three spin components along the trajectory using the zgoubi.plt output file (particle and field data logging to zgoubi.plt results from IL=2 in all optical elements; the data format of zgoubi.plt is detailed in [1, Sec. 8.3]). See the plotting examples in Tables 14.29 and 14.30 and use analogous files for the second rotator design. Compare the results with your description in the previous exercise.

*Question 14.1.2.2-7*: Track the spins of particles with different relative momentum offsets (−0.04, −0.03, −0.02, −0.01, 0, 0.01, 0.02, 0.03, 0.04) in the two spin rotator schematics using the code in Table 14.31 for the first design version and an analogous code for the second one. Explore how the final spin depends on the momentum deviation by plotting the final spin versus the momentum offset in the

```
set term postscript eps enhanced \
  color size 9.3cm,6cm "Times-Roman" 12
set output "pol_align.eps"
set grid
set size 1.0,1.0
set xlabel "Turns [x10^{3}]"
set ylabel "P_{z}"
set xtics 0.2
set ytics 0.0005
unset key
A=1
B = 1000000
f(x)=A*exp(-x/B)
fit f(x) "./ave_pol_align.txt" u ($1/1000):($6) via A,B
plot [][0.999:1.001] "./ave_pol_align.txt" \
u ($1/1000):($6) w l lc rgb 'red' lw 1.5 ,\
f(x) lc rgb 'blue' lw 1.5
exit
```

```
Table 14.23 Gnuplot script for plotting the polarization
```

```
Table 14.24 Setup of the "QVA1" quadrupole with 1 mm vertical offset
```

```
'MULTIPOL' QVA1 QUAD
0 .Quad
0.493916E+02 10.0000 0.0000 -0.5472896982 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
2.00 ! cm MultQVA1
4 0. 0. 0. 0.1 0 ! KPOS=4 allows specifying ZS=0.1cm.
```
### **Table 14.25** Setup of the "FIT2" procedure for finding the closed orbit

```
'FIT2'
4 noSYSout ! final (NOT nofinal) is mandatory: causes store of actual c.o. in zgoubi.SVD.out
1 30 0 [-5.9,5.9] ! Vary Y0
1 31 0 [-9.9,9.9] ! Vary T0
1 32 0 [-5.9,5.9] ! Vary Z0
1 33 0 [-9.9,9.9] ! Vary P0
4 1e-10
3.1 1 2 #End 0. 1. 0 ! Yfinal = Y0
3.1 1 3 #End 0. 1. 0 ! Tfinal = T0
3.1 1 4 #End 0. 1. 0 ! Zfinal = Z0
3.1 1 5 #End 0. 1. 0 ! Pfinal = P0
```
**Table 14.26** Setup of the "OBJET" element for launching 100 electrons along the perturbed closed orbit

'OBJET' 1 33.3564095089e3 10GeV E\_k+M electron. 1 100 1 1 1 1 1 0.E+00 0.E+00 0.E+00 0.E+00 0.00 0.E+00 -5.78398841E-06 -5.02369232E-06 -2.40168827E-01 -5.80016582E-01 0.00 1.

### **Table 14.27** Zgoubi file of a spin rotator lattice where the spin is not longitudinally matched

```
Spin rotator, version 1
'OBJET'
33.3564095089e3 10GeV E_k+M electron.
1
111111
0.E+00 0.E+00 0.E+00 0.E+00 0.00 0.E+00
0. 0. 0. 0. 0. 1.
'PARTICUL'
POSITRON
'SPNTRK'
4.1
0. 0. 1.
'SCALING'
1 1
BEND
1
1
'DRIFT' DRIF
10.
'SOLENOID' SOLE
2 .sole
1000.0 2.0 52.3354354
25 25
1. cm
1 0. 0. 0.
'DRIFT' DRIF
10.
'BEND' DHA1T
2 .Bend
100. 0.0E+00 23.08831973 ! 69.2 mrad bend
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'DRIFT' DRIF
10.
'DRIFT' DRIF
10.
'BEND' DHA1T
2 .Bend
100. 0.0E+00 23.08831973
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'DRIFT' DRIF
10.
'SOLENOID' SOLE
2 .sole
1000.0 2.0 52.3354354
25 25
1. cm
1 0. 0. 0.
'DRIFT' DRIFEND
10.
'END'
```

```
Spin rotator, version 2
'OBJET'
33.3564095089e3 10GeV E_k+M electron.
1
111111
0.E+00 0.E+00 0.E+00 0.E+00 0.00 0.E+00
0. 0. 0. 0. 0. 1.
'PARTICUL'
POSITRON
'SPNTRK'
4.1
0. 0. 1.
'SCALING'
1 1
BEND
1
1
'DRIFT' DRIF
10.
'SOLENOID' SOLE
2 .sole
1000.0 2.0 52.3354354
25 25
1. cm
1 0. 0. 0.
'DRIFT' DRIF
10.
'BEND' DHA1T
2 .Bend
100. 0.0E+00 23.08831973
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'DRIFT' DRIF
10.
'DRIFT' DRIF
10.
'BEND' DHA1T
2 .Bend
100. 0.0E+00 -23.08831973
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'DRIFT' DRIF
10.
'SOLENOID' SOLE
2 .sole
1000.0 2.0 -52.3354354
25 25
1. cm
1 0. 0. 0.
'DRIFT' DRIFEND
10.
'END'
```
**Table 14.28** Zgoubi file of a spin rotator lattice where the spin is longitudinally matched

### **Table 14.29** Gnuplot script for plotting the field components

```
set term postscript eps enhanced color size 9.3cm,6cm "Times-Roman" 12
set output "spin_rotator_fields.eps"
set grid
set size 1.0,1.0
set xlabel "s [m]"
set ylabel "B (T)"
set xtics 5
set ytics 2
set key bottom left
plot [-1:][-0.1:] \
"./zgoubi.plt" u ($14/100):($23/10) w l lc rgb 'red' lw 1.5 title "B_{x}",\
"./zgoubi.plt" u ($14/100):($24/10) w l lc rgb 'green' lw 1.5 title "B_{y}",\
"./zgoubi.plt" u ($14/100):($25/10) w l lc rgb 'blue' lw 1.5 title "B_{z}"
exit
```

```
Table 14.30 Gnuplot script for plotting the spin components
```

```
set term postscript eps enhanced color size 9.3cm,6cm "Times-Roman" 12
set output "spin_rotator_spin.eps"
set grid
set size 1.0,1.0
set xlabel "s [m]"
set ylabel "S"
set xtics 5
set ytics 0.5
set key bottom left
plot [-1:][-1.1:1.1] \
"./zgoubi.plt" u ($14/100):($33) w l lc rgb 'red' lw 1.5 title "S_{x}",\
"./zgoubi.plt" u ($14/100):($34) w l lc rgb 'green' lw 1.5 title "S_{y}",\
"./zgoubi.plt" u ($14/100):($35) w l lc rgb 'blue' lw 1.5 title "S_{z}"
exit
```
two cases using the script in Table 14.32. Discuss which case you expect to have a lower spin diffusion rate and why. Note that this is the first order spin matching in the longitudinal direction.

### **14.1.2.5 Spin Matching**

This section studies the electron spin dynamics at 5 GeV in the AGS Booster in the presence of a solenoidal snake. We consider the cases of spin-matched and spin-mismatched snake configurations. The spin-matched snake lattice is given by the include file listed in Table 14.33. The snake consists of two solenoids with six quadrupoles between them. The quadrupoles are used to compensate betatron coupling from the solenoids and to satisfy the spin matching conditions.

*Question 14.1.2.5-1*: Use the snake include file in Table 14.33 to insert the snake at the end of the AGS Booster lattice as shown in Table 14.34. Examine the resulting periodic optics using the Gnuplot script in Table 14.14.

*Question 14.1.2.5-2*: Obtain the **n**<sup>0</sup> axis at the start point of the lattice by running the code in Table 14.35 and examining its output "zgoubi.res" file.

*Question 14.1.2.5-3*: Determine the spin diffusion rate of this lattice. Track 100 electrons for 10<sup>4</sup> turns with synchrotron radiation enabled. Start the electrons **Table 14.31** Zgoubi code for studying the momentum dependence of the spin rotation using the unmatched lattice

```
Momentum dependence of spin rotation - unmatched lattice
'OBJET'
33.3564095089e3 10GeV E_k+M electron.
1
111119
0.E+00 0.E+00 0.E+00 0.E+00 0.00 0.010000E+00
0. 0. 0. 0. 0. 1. 'o'
'PARTICUL'
POSITRON
'SPNTRK'
4.1
0. 0. 1.
'FAISTORE' ! Hint: use zgoubi_matched.fai for 2nd case.
zgoubi_unmatched.fai DRIFEND
1
'SCALING'
1 1
BEND
1
1
'DRIFT' DRIF
10.
'SOLENOID' SOLE
0 .sole
1000.0 2.0 52.3354354
25 25
1. cm
1 0. 0. 0.
'DRIFT' DRIF
10.
'BEND' DHA1T
0 .Bend
100. 0.0E+00 23.08831973
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'DRIFT' DRIF
10.
'DRIFT' DRIF
10.
'BEND' DHA1T
0 .Bend
100. 0.0E+00 23.08831973
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'DRIFT' DRIF
10.
'SOLENOID' SOLE
0 .sole
1000.0 2.0 52.3354354
25 25
1. cm
1 0. 0. 0.
'DRIFT' DRIFEND
10.
'FAISCEAU'
'END'
```
**Table 14.32** Gnuplot script for plotting the final vertical spin component as a function of the particle's momentum offset for the two rotator schemes

```
set term postscript eps enhanced color size 9.3cm,6cm "Times-Roman" 12
set output "final_spin.eps"
set grid
set size 1.0,1.0
set xlabel "{/Symbol D}p/p"
set ylabel "S_{z}"
set xtics 0.02
set ytics 0.002
set key bottom left
plot [][] \
"< sort -nk2 zgoubi_1.fai" u 2:22 w l lc rgb 'red' lw 1.5 title "Scheme 1",\
"< sort -nk2 zgoubi_2.fai" u 2:22 w l lc rgb 'blue' lw 1.5 title "Scheme 2"
exit
```
on the design trajectory with their initial spins aligned with the **n**<sup>0</sup> axis. Refer to Table 14.36 for the corresponding Zgoubi code. Calculate the polarization components using a Gnuplot script similar to that in Table 14.22 and plot the total transverse polarization as a function of the turn number following the example of Table 14.23.

*Question 14.1.2.5-4*: Reverse the polarity of all quadrupoles ("HQ1" through "HQ6") between the snake solenoids in Table 14.33. This change keeps betatron coupling compensated but results in violation of the spin matching conditions. Complete tracking through the AGS Booster with the modified snake lattice and analyze the results as in Question 14.1.2.5-3. Compare the spin diffusion rates obtained in the spin matched and unmatched cases.

# **14.2 Numerical Simulations: Solutions**

This Section details the solutions of the simulation exercises proposed in Sect. 14.1.

Understanding these simulations requires having the code manual at hand, ready to consult, Zgoubi Users' Guide [1] in the present case, or whatever other code the reader my be willing to use otherwise.

In order to reproduce these numerical simulations, the code executable is required. Zgoubi package can be downloaded from its repository in sourceforge:

https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/

A README file therein explains how the source code is compiled to generate the executable, zgoubi. Running an optical sequence (say, Booster\_Twiss.dat) is then just a matter of executing such command as

[pathTo]/zgoubi -in Booster\_Twiss.dat

and the results are listed, a minima, in zgoubi.res file, by default.

All necessary optical sequences for the simulation exercises have been provided as part of the assignments in Sect. 14.1, however most of the simulation material **Table 14.33** Contents of the "snake\_matched.inc" include file providing the lattice of a spinmatched solenoidal snake

```
'MARKER' snake_sol_s
'DRIFT' DRIF LDH1SN
11.0
'SOLENOID' SOLE SN_SOL
0 .sole
40.0 2.0 39.26987500004383
40. 40.
0.1 cm
1 0.0 0.0 0.0
'DRIFT' DRIF LSN1
19.5
'MULTIPOL' HQ1 QUAD
0 .Quad
1.0 10.0 0.0 -9.012691897 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1. cm
1 0.0 0.0 0.0
'DRIFT' DRIF LSN2
19.0
'MULTIPOL' HQ2 QUAD
0 .Quad
1.0 10.0 0.0 503.4519374 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1. cm
1 0.0 0.0 0.0
'DRIFT' DRIF LSN2
19.0
'MULTIPOL' HQ3 QUAD
0 .Quad
1.0 10.0 0.0 -535.3938472 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1. cm
1 0.0 0.0 0.0
'DRIFT' DRIF LSN2
19.0
'MULTIPOL' HQ4 QUAD
0 .Quad
1.0 10.0 0.0 775.4968481 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1. cm
1 0.0 0.0 0.0
'DRIFT' DRIF LSN2
19.0
'MULTIPOL' HQ5 QUAD
0 .Quad
1.0 10.0 0.0 -437.5504952 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1. cm
1 0.0 0.0 0.0
'DRIFT' DRIF LSN2
19.0
'MULTIPOL' HQ6 QUAD
0 .Quad
1.0 10.0 0.0 406.0280703 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1. cm
1 0.0 0.0 0.0
'DRIFT' DRIF LSN1
19.5
'SOLENOID' SOLE SN_SOL
0 .sole
40.0 2.0 39.26987500004383
40. 40.
0.1 cm
1 0.0 0.0 0.0
'DRIFT' DRIF LDH4SN
11.0
'MARKER' snake_sol_e
```
**Table 14.34** Left: Zgoubi file of the AGS Booster lattice with the spin-matched snake for Twiss calculation. Right: the scaling\_5GeVel.inc INCLUDE file, also used in subsequent exercises

**Table 14.35** Zgoubi file of the AGS Booster lattice with the spin-matched snake for **n**<sup>0</sup> calculation

```
AGS Booster lattice with spin-matched snake for n_0 calculation
'OBJET'
16.67820475445e3 ! reference rigidity ->p=5 GeV/c
1
3 11111
0.E+00 0.E+00 0.E+00 0.E+00 0.00 0.E+00
0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00 1.
'PARTICUL'
0.51099892 1.60217653e-19 1.15965218076e-3 0. 0.
'SRLOSS'
0 ! .srloss
BEND
1 123456
'SPNTRK'
4
1. 0. 0.
0. 1. 0.
0. 0. 1.
'INCLUDE'
1
scaling_5GeVel.inc[SCALING_S:SCALING_E]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'INCLUDE'
1
snake_mismatched.inc[snake_sol_s:snake_sol_e]
'SPNPRT' MATRIX
'END'
```
**Table 14.36** Zgoubi file for tracking 100 electrons for 104 turns through the AGS Booster lattice with the spin-matched snake

```
Tracking 100 electrons for 10^4 turns through Booster
'OBJET'
16.67820475445e3 ! reference rigidity ->p=5 GeV/c
1
100 1 1 1 1 1
0.E+00 0.E+00 0.E+00 0.E+00 0.00 0.E+00
0.00E+00 0.00E+00 0.00E+00 0.00E+00 0.00 1.
'PARTICUL'
0.51099892 1.60217653e-19 1.15965218076e-3 0. 0.
'SRLOSS'
1 ! .srloss
BEND
1 123456
'SPNTRK'
4.1
0.4626 0.8866 0.0
'FAISTORE'
zgoubi.fai
100
'INCLUDE'
1
scaling_5GeVel.inc[SCALING_S:SCALING_E]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'INCLUDE'
1
snake_mismatched.inc[snake_sol_s:snake_sol_e]
'CAVITE'
2
204.2000486 100 ! orbit length, h
7974784.27279453 2.61799387799 ! volts, phi_s rad, 5 GeV
'REBELOTE'
9999 0.1 99
'END'
```
further discussed and used here (input data files, gnuplot scripts, etc.) is also available in the sourceforge repository, at

https://sourceforge.net/p/zgoubi/code/HEAD/tree/trunk/exemples/uspasSpinClass\_2021/

Brief additional introductory guidance to using the code can be found in the Appendix, page 405.

# *14.2.1 Polarized Helion in AGS Booster*

### **14.2.1.1 AGS Booster Parameters**

Table 14.2 has been completed, yielding Table 14.37. Some derivations are detailed hereafter.


With *M* = 2808*.*39 MeV, |*G*| = 4*.*18415, and *dE/dN* = *qV*ˆ sin*(φs)* = 0*.*4 MeV/turn (q=2, *V*ˆ = 0*.*4 MV, *φs* = 30 deg), the crossing speed comes out to be

$$\frac{dG\gamma}{d\theta} = \frac{1}{2\pi} \frac{G}{M} \frac{dE}{dN} = -9.4848 \times 10^{-8} \text{ J}$$

The following excerpt from the "print" file generated by a MAD8 computation of the Booster optical functions is aimed at allowing a comparison with Zgoubi outcomes in the next question:


### **14.2.1.2 Cell and Lattice Optics**

Questions 14.1.1.2.1–14.1.1.2.3—Running superA.inc, due to the MATRIX command at the downstream end of the optical sequence, produces the first order transport matrix of the super cell, say *T*cell, and the corresponding beam matrix, i.e. the periodic optical functions at cell ends (using the relation *T*cell = *I* cos*μ* + *J* sin *μ*).

These two matrices are found at the bottom of the computation listing, zgoubi.res.

Checking against the data in MAD8 'print' output file (Sect. 14.2.1.1) shows a very good agreement.

*Question 14.1.1.2.4*—Running superA.inc with a TWISS command instead, produces, on the one hand, the following lattice parameter computation outcomes (similar to MATRIX outcomes), found down zgoubi.res listing (an excerpt):

```
******************************************************************************************************************************
  112 Keyword, label(s) : TWISS IPASS= 4
                   *********************************************************
                   ************** End of TWISS procedure **************
    There has been 4 pass through the optical structure
Reference, before change of frame (particle # 1 - D-1,Y,T,Z,s,time) :
 0.00000000E+00 -7.65859598E-13 2.62290190E-12 0.00000000E+00 0.00000000E+00 3.36300081E+03 3.68572492E-01
        Frame for MATRIX calculation moved by :
        XC = 0.000 cm , YC = -0.000 cm , A = 0.00000 deg ( = 0.000000 rad )
Reference, after change of frame (particle # 1 - D-1,Y,T,Z,s,time) :
 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 0.00000000E+00 3.36300081E+03 3.68572492E-01
 Reference particle (# 1), path length : 3363.0008 cm relative momentum : 1.00000
             TRANSFER MATRIX ORDRE 1 (MKSA units)
      -0.716001 -5.32491 0.00000 0.00000 0.00000 0.716859
       0.348220 1.19307 0.00000 0.00000 0.00000 -0.238490
       0.00000 0.00000 1.78816 -9.15235 0.00000 0.00000
       0.00000 0.00000 0.330121 -1.13043 0.00000 0.00000
      -7.886126E-02 0.414707 0.00000 0.00000 1.00000 1.58173
       0.00000 0.00000 0.00000 0.00000 0.00000 1.00000
       DetY-1 = -0.0000004260, DetZ-1 = -0.0000004317
       R12=0 at 4.463 m, R34=0 at -8.096 m
    First order symplectic conditions (expected values = 0) :
     -4.2604E-07 -4.3171E-07 0.000 0.000 0.000 0.000
           TWISS parameters, periodicity of 1 is assumed
                           - COUPLED -
     Beam matrix (beta/-alpha/-alpha/gamma) and periodic dispersion (MKSA units)
       5.483186 -0.982907 0.000000 0.000000 0.000000 0.742996
       -0.982907 0.358570 0.000000 0.000000 0.000000 -0.104814
       0.000000 0.000000 9.691428 1.545246 0.000000 -0.000000
       0.000000 0.000000 1.545246 0.349565 0.000000 0.000000
       0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
       0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
                       Betatron tunes (Q1 Q2 modes)
               NU_Y = 0.78833338 NU_Z = 0.80333330
                           Momentum compaction :
                       dL/L / dp/p = 4.39982231E-02
                           Transition gamma = 4.76740921E+00
                           Chromaticities :
               dNu_y / dp/p = -0.80312438 dNu_z / dp/p = -0.86404335
*******************************************************************************************************************************
```
**Fig. 14.5** Left: booster super cell optical functions, from a TWISS computation. Right: it is not a bad idea to check what the horizontal and vertical orbits are, zero as expected in the present case

The TWISS command causes in addition the transport of the periodic optical functions throughout the sequence, logged in zgoubi.TWISS.out. These optical functions are displayed in Fig. 14.5.

Note: to produce this set of outputs, the TWISS command performs 4 consecutive passes through the optical sequence, see Users' Guide for details.

### **14.2.1.3 Spin Optics**

The rigidity specified in the provided input data files and used in the previous question (superA.inc, etc.) is 1 T m. However, proper spin motion requires proper *Gγ* value! Thus, the rigidity in this exercise has to be changed to the injection value, namely (Table 14.37),

$$B\rho = 0.30745 \,\mathrm{T} \,\mathrm{m}$$

*Question 14.1.1.3.1*—The spin motion of a helion is tracked along Booster for the case of an ideal ring (six superA cells, planar, no defects) using the input data file given in Table 14.7. One particle is taken on-momentum, the other two at *δp/p* = ±10−<sup>4</sup> and launched on their respective chromatic closed orbits, given the dispersion and its derivative (Sect. 14.2.1.2)

$$
\eta\_{\chi} = 0.743 \text{ m}, \quad \eta\_{\chi}^{\prime} = -0.1048 \text{ rad}
$$

Tracking shows that the spin precession direction is vertical around the ring, for both on- and off-momentum particles (Fig. 14.6). This is what's expected as the chromatic closed orbits also lie in the median plane: the field is everywhere vertical along a chromatic closed orbit as well, particles do not experience any horizontal field component, no field may kick spins away from vertical.

**Fig. 14.6** Spins of 3 ions, respectively on- and <sup>±</sup>10−<sup>4</sup> off-momentum, along their respective closed orbits around Booster. The vertical component *SZ* is constant all along, thus the precession direction is vertical. *SX* and *SY* are circling around the Z axis, in the bend plane

Questions 14.1.1.3.2, 14.1.1.3.3—Tracking the spin closed orbit over a turn for particles at *dp/p* <sup>=</sup> 0 and *dp/p* = ±10−<sup>4</sup> off-momentum, yields spin motions displayed in Fig. 14.6.

Adding SPNPRT[MATRIX] allows for producing the spin matrices, however that also requires changing OBJET and SPNTRK data in Table 14.7, so to create 3 groups (as many as there are different momenta) of 3 particles each, as follows:

```
'OBJET'
0.3074552E3 ! Reference rigidity/kG.cm, for 3He++, at injection beta value 0.0655.
2 ! An option to define initial particle coordinates, one by one; here, 3 different
9 3 ! momenta, 9 particles; this is ordered to allow spin matrix computation by SPNPRT.
7.43281000E-03 -1.04862116E-02 0. 0. 0. 1.0001 'p' ! Group 1. Orbit coordinates for a
7.43281000E-03 -1.04862116E-02 0. 0. 0. 1.0001 'p' ! momentum offset of D=+1e-4.
7.43281000E-03 -1.04862116E-02 0. 0. 0. 1.0001 'p'
0. .0 0. 0. 0. 1. 'o' ! Group 2. On-momentum 3-particle set.
0. .0 0. 0. 0. 1. 'o'
0. .0 0. 0. 0. 1. 'o'
111111111
'PARTICUL' ! Defining the particle species is necessary, in order for the program to solve
HELION ! the T-BMT equation.
'SPNTRK' ! The 9 initial spins are organized so to allow spin matrix
4 ! computation by SPNPRT, for each of the 3 different momenta concerned.
1. 0. 0. ! S_X, particle 1,
0. 1. 0. ! S_Y, particle 1,
0. 0. 1. ! S_Z, particle 1,
1. 0. 0. ! S_X/ particle 2,
0. 1. 0. ! etc.
0. 0. 1.
1. 0. 0.
0. 1. 0.
0. 0. 1.
```
This yields the following, including the spin transport matrix, fractional spin tune and precession axis, for each of the 3 momenta (an excerpt):


```
0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 1.0000E+00 9.99900E-01 1.00215E+00 9 1
              Spin transfer matrix, momentum group # 3 :
       0.349613 -0.936894 0.00000
       0.936894 0.349613 0.00000
       0.00000 0.00000 1.00000
    Trace = 1.6992262279, ; spin precession acos((trace-1)/2) = 69.5363467325 deg
   Precession axis : ( 0.0000, 0.0000, 1.0000) -> angle to (X,Y) plane, angle to X axis : 90.0000, 90.0000 degree
   Spin tune Qs (fractional) : 1.9316E-01
************************************************************************************************************************************
```
This simulation confirms the answer to Question 14.1.1.3.1.

The value of the spin precession angle is *θsp* = *Gγ α* modulo 360◦. The on-momentum value of *Gγ α* can be found under PARTICUL in zgoubi.res (an excerpt):


which yields a theoretical spin rotation of


(the on-momentum "group 2" above indicates 69.5369940370deg) or equivalently a fractional spin tune value of

$$\nu\_{sp} = 4.193158315/360 = 0.193158315$$

also in accord with the on-momentum "group 2" above which indicates 1.9316E-01.

From theory (after Eq. 3.11, transposed to 3D space)

$$\text{fracc}(\nu\_{\text{sp}}) = \frac{1}{2\pi} \text{acos} \frac{\text{Trace}(\text{spin matrix}) - 1}{2}$$

whereas the spin matrix from tracking says (momentum "group 2" above)

$$\text{Trace}\left[\text{spin matrix}\right] = 1.6992050586$$

in accord with the above spin tune value *ν*sp = 0*.*193158.

Off-momentum (groups 1 and 3):

*<sup>γ</sup>* needs to be corrected for the *dp/p* = ±10−<sup>4</sup> particles. The corresponding numerical results can be found under "group 1" and "group 3" above, respectively, and can be checked to agree with the theory.

### **14.2.1.4 Depolarizing Resonances**

*Question 14.1.1.4.1*—Locations (*Gγ* values) of the depolarizing resonances in the range

$$-10.5 \le \mathbf{G}\boldsymbol{\gamma} \le -4.19316$$

have been added to Table 14.8, yielding Table 14.38 (integer/imperfection resonances of the form *Gγ* = integer), and to Table 14.9, yielding Table 14.39 (systematic intrinsic resonances of the form *Gγ* = 6 × integer ± *Qy* ).

*Question 14.1.1.4.2*—Figure14.7 illustrates intrinsic resonance crossings with two graphs of Sy*(*G*γ )*, as follows:



**Table 14.39** Systematic intrinsic resonances (M=6 super-periods, *νy* = 4*.*82), location and strengths. The latter are normalized to *εy /π*, with *εy /π* being the particle invariant value. The "theory" column is filled-out using the thin lens model series. The "station." (stationary) column is filled-out using |*n*| ≡ *ω(δn* = 0*)*, Question 14.1.1.6. Completion of the "crossing" column is addressed in Question 14.1.1.8 and Table 14.43


**Fig. 14.7** Evolution of the vertical spin component of a few particles launched on the same invariant, with different initial betatron phases. The dark red curve is the average over 23 particles. Left: *εy* = 2*.*5 *π*µm; right: *εy* = 0*.*25 *π*µm

Figure 14.7 is obtained with the following combined awk (left hand side) [11] and gnuplot (right) scripts:

```
! Average over particles of SZ values read in zgoubi.fai
function analyze(x, data){
    n = 0;mean = 0; val_min = 0;val_max = 0;
    NBturns = 20000;
    Gg1 =4.193158; Gg2 =16; dGg = (Gg2-Gg1)/(NBturns-1);
    for(val in data){
        n += 1;
        delta = val - mean;
        mean += delta/n;
        val_min = (n == 1)?val:((val < val_min)?val:val_min);
        val_max = (n == 1)?val:((val > val_max)?val:val_max);
    }
    if(n > 0){
        print x, mean, val_min, val_max;
    }
}
{
    curr = $38*dGg + Gg1; yval = $(col_num);
    if(NR==1 || prev != curr){
        analyze(prev, data);
        delete data;
        prev = curr;
    }
    data[yval] = 1;
}
END{
    analyze(curr, data);
}
                                                                    set title "SZ(turn) and <SZ(turn)>_particles"
                                                                    nbtrj=100; evryNtrj = 5; evryNpass=9
                                                                    NBturns = 20000
                                                                    Gg1 =4.193158 ; Gg2 =16 ; dGg = (Gg2-Gg1)/(NBturns-1)
                                                                    set xlab "turns"; set ylab "Average S_y over particles"
                                                                    unset colorbox
                                                                    fName = 'zgoubi.fai'
                                                                    plotCmd(col_num)=sprintf('< gawk -f analyze.awk -v col_num=%d %s', col_num, fName)
                                                                    set format y '%0.2f'
                                                                    set xr [:20e3]; set xr [Gg1:Gg2]; set yr [-1.01:1.01]
                                                                    plot for [it=1:nbtrj:evryNtrj] "zgoubi.fai" \
                                                                    u ($26==it && evryNpass*int($38/evryNpass)==$38? $38*dGg + Gg1 :1/0):($22):($26) \
                                                                    w p pt 7 ps .1 lc palette notit ,\
                                                                        plotCmd(22) u 1:2 w p pt 5 ps .4 lc rgb 'dark-red' t '<S_y>'
```
When comparing these two graphs, essentially two things are observed: the spin kick across a resonance and the spin kick spread are smaller, when the invariant is smaller:


For the record: the resonance strength is ∝ *εy/π* (Eq. 2.35).

**Fig. 14.8** A sensible question at this point is whether these results converge. The present figure is obtained using 200 particles. Comparison with the 23 trajectory case of Fig. 14.7 does not show much difference. The final polarizations is very similar, the problem converges

**Fig. 14.9** Fields experienced in vertical quadrupoles during vertical betatron motion: 3 different particles are displayed here, over 3 turns around the ring. They are taken on the same invariant but with different initial betatron phases

*Question 14.1.1.4.3*—A graph showing the span in magnetic field strengths experienced in the vertical quadrupoles by the 3 orbiting particles with the same invariant value, as an effect of their different initial betatron phases, is given in Fig. 14.9. The three vastly different torque series experienced by these particles' spins result in largely different spin states upon crossing the resonances (Fig. 14.7).

### **14.2.1.5 Imperfection Resonance Strengths**

An excerpt of the input data file used is given in Table 14.40. It shows in particular


The vertical closed orbit so obtained is shown in Fig. 14.10.

The resonance strengths to be computed here, as a function of energy, all assume that very closed orbit (and obviously, the same optical functions).

Resonance strength calculation uses (Eq. 2.29)

$$\left\{ \begin{matrix} \mathcal{Re}(\epsilon\_n^{\mathrm{imp}}) \\ \mathcal{Im}(\epsilon\_n^{\mathrm{imp}}) \end{matrix} \right\} = \frac{1 + G\gamma}{2\pi} \sum\_{\mathrm{Qpoles}} \begin{Bmatrix} \cos G\gamma\alpha\_l \\ \sin G\gamma\alpha\_l \end{Bmatrix} (KL)\_l \text{ y}\_{co}(\theta\_l)$$

which can be evaluated numerically. In this formula, the following data are read from zgoubi.TWISS.out at the locations of the quadrupoles (i index):


These quantities do not depend on *Gγ* (magnet fields are ramped to follow the value of the reference rigidity OBJET[BORO]).

Table 14.8 has been updated with the imperfection resonance strengths obtained this way yielding the "theory" column of Table 14.38.

### **14.2.1.6 Intrinsic Resonance Strengths**

The optical functions and periodic vertical orbit are needed here, which means use of the output file zgoubi.TWISS.out. This file is produced using the input data file of the complete ring, equipped with a TWISS command, as in Sect. 14.2.1.2.

Resonance strength is obtained by summing the series (Eq. 2.35)

$$\left\{ \begin{matrix} \mathcal{R}e(\epsilon\_n^{\mathrm{intra}}) \\ \mathcal{I}m(\epsilon\_n^{\mathrm{intra}}) \end{matrix} \right\} = \frac{1 + G\gamma}{4\pi} \sum\_{\mathrm{Qpoles}} \begin{Bmatrix} \cos(G\gamma\alpha\_l \pm \varphi\_l) \\ \sin(G\gamma\alpha\_l \pm \varphi\_l) \end{Bmatrix} (KL)\_l \sqrt{\beta\_{\mathrm{y},l} \frac{\varepsilon\_{\mathrm{y}}}{\pi}}$$

**Table 14.40** Head, intermediate quadrupoles, and tail of the Booster sequence, including vertical quadrupole misalignments, as well as a FIT-TWISS sequence which computes vertical orbit and optical functions (logged in zgoubi.TWISS.out), accounting for non-zero closed orbit (FIT first finds the orbit, prior to passing on to TWISS). The reference rigidity for this zgoubi.TWISS.out computation is arbitrary as the vertical orbit (and optical functions obviously) are maintained unchanged regardless of *Gγ* in these exercises (the fields are ramped to follow the value of the reference rigidity OBJET[BORO]). The final SYSTEM command causes execution of an external file, which plots the closed orbits and optical functions, reading the latter data from zgoubi.TWISS.out

```
Booster ring, complete, with vertical orbit.
'OBJET'
3.0428810404e+03
5
.001 .01 .001 .01 .001 .0001
0. 0. 0.84273180 1.5602297 0. 1. ' '
'PARTICUL'
HELION
'SCALING'
1 3
BEND
3.04288104
1
MULTIPOL QH* ! QH family is set for Qx=4.73 & Qy=4.82 tunes.
3.30602909
1
MULTIPOL QV* ! QV family is set for Qx=4.73 & Qy=4.82 tunes.
3.24298881
1
'MARKER' LA1S
'DRIFT' DRIF L057
57.0400
................................................
'MULTIPOL' QVA1 QUAD
0 .Quad
0.493916E+02 10.0000 0. -0.5472896982 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
2. ! cm MultQVA1
5 0.0 0.0 0.67238500 0 0 0
................................................
'MULTIPOL' QHA2 QUAD
0 .Quad
0.485016E+02 10.0000 0. 0.5256342158 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
2. ! cm MultQHA2
5 0.0 0.0 0.73457500 0 0 0
................................................
                                                               'MULTIPOL' QHF8 QUAD
                                                               0 .Quad
                                                               0.485016E+02 10. 0. 0.5256342158 0. 0. 0. 0. 0. 0. 0. 0.
                                                               0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
                                                               6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
                                                               0. 0. 6.00 3.00 1.00 0.00 0.00 0.00 0.00 0. 0. 0. 0.
                                                               6 .1122 6.2671 -1.4982 3.5882 -2.1209 1.723
                                                               0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
                                                               2. ! cm MultQHF8
                                                               5 0.0 0.0 0.38532700 0 0 0
                                                               'DRIFT' DRIF L031
                                                               29.9367
                                                               'BEND' DHF8T SBEN
                                                               0 .Bend
                                                               1.2096161E+02 0. 7.2121043E-01
                                                               0.00 0.00 0.00000000
                                                               4 .2401 1.8639 -.5572 .3904 0. 0. 0.
                                                               0.00 0.00 0.00000000
                                                               4 .2401 1.8639 -.5572 .3904 0. 0. 0.
                                                               1.0000E+00 cm Bend
                                                               3 0. 0. 0.
                                                               'BEND' DHF8Z SBEN
                                                               0 .Bend
                                                               1.2096161E+02 0. 7.2121043E-01
                                                               0.00 0.00 0.00000000
                                                               4 .2401 1.8639 -.5572 .3904 0. 0. 0.
                                                               0.00 0.00 0.00000000
                                                               4 .2401 1.8639 -.5572 .3904 0. 0. 0.
                                                               1.0000E+00 cm Bend
                                                               3 0. 0. 0.
                                                               'MARKER' LA2E
                                                               'FIT'
                                                               2 ! 2 variables, as follows.
                                                               1 32 0 [-1.,1.] ! Allow +/-1cm variation of Z_0.
                                                               1 33 0 [-10.,10.] ! Allow +/-10mrad variation of P_0.
                                                               2 1e-10 ! 2 constraints; requested penalty is 1e-10.
                                                               3.1 1 4 #End 0. 1. 0 ! Request final posit. Z=initial Z_0.
                                                               3.1 1 5 #End 0. 1. 0 ! Request final angle P=initial P_0.
                                                               'TWISS'
                                                               2 1. 1.
                                                               'FAISCEAU' ! Allows quick check of initial=final Z, P.
                                                               'SYSTEM' ! Plot closed orbits and optical functions.
                                                               1
                                                               gnuplot < ./gnuplot_TWISS.gnu
                                                               'END'
```
which can be calculated numerically. In this formula, the following data are read from zgoubi.TWISS.out at the locations of the quadrupoles (i index):


**Fig. 14.10** Vertical closed orbit excited by the quadrupole misalignments of Table 14.10

These quantities do not depend on *Gγ* (magnet fields are ramped to follow the value of the reference rigidity OBJET[BORO]).

For a reference, the upper and lower parts of zgoubi.TWISS.out data file (as produced by the TWISS command), showing the optical function values along the sequence needed to compute the series above are as follows (excerpts):


```
1.6898235E+000 1.2487484E+001 -6.6866811E-001 4.1920085E+000 0.0000000E+000 0.0000000E+000 1.6554672E+000 etc.
1.3706530E+000 8.7748783E+000 -1.0863704E+000 6.3156052E+000 0.0000000E+000 0.0000000E+000 1.3317807E+000
1.0098358E+000 5.8871527E+000 -1.5040727E+000 9.4500414E+000 0.0000000E+000 0.0000000E+000 1.1034842E+000
1.0098358E+000 5.8871527E+000 -1.5040727E+000 9.4500414E+000 0.0000000E+000 0.0000000E+000 1.1034842E+000
1.0098358E+000 5.8871527E+000 -1.5040727E+000 9.4500414E+000 0.0000000E+000 0.0000000E+000 1.1034842E+000
1.0098358E+000 5.8871527E+000 -1.5040727E+000 9.4500414E+000 0.0000000E+000 0.0000000E+000 1.1034842E+000
```
A detailed description of zgoubi.TWISS.out data column format can be found in the Users' Guide, Section 8.4.

Table 14.9 has been updated with the intrinsic resonance strengths obtained here, yielding the "theory" column of Table 14.39.

### **14.2.1.7 Spin Motion Through Imperfection Resonances**

Input data files similar to those in the answer to Question 14.1.1.5 (Sect. 14.2.1.5 and Table 14.40) are used here. They only differ by


An interface has been developed in python (an evolution, by the present coauthors, of pyZgoubi [4]), which takes care of repeating the tracking at various distances *ΔGγ* = *Gγ* − *Gγn* from the resonance, in Question 14.1.1.8.1, or at various resonant frequencies *Gγn* in Question 14.1.1.8.2 thus automating the procedure.

*Question 14.1.1.8.1*—The following shows the head and tail of the tracking input data file, in the stationary case, on the resonance *Gγn* = −6. Note the INCLUDE of the SCALING segment [SCALING\_S:SCALING\_E] as defined in Table 14.7, with the field coefficient updated to present BORO/1000 value, namely, 4.8139470584

```
Booster
'OBJET'
4.8139470584e+03 ! Rigidity at G.gamma=-6.
2
1 1
0. 0. 0.84273180 1.5602297 0. 1. ' ' ! Track a single 3He, launched on closed orbit.
1
'PARTICUL'
HELION
'SPNTRK' ! Start with spin vertical.
3
'FAISTORE'
zgoubi.fai
1
         ! Scaling coefficients in scaling_Gg6.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg6.inc[SCALING_S,*:SCALING_E,*]
'DRIFT' DRIF L057
57.0400
...............
'BEND' DHF8Z SBEN
0 .Bend
1.2096161E+02 0.0000000E+00 7.2121043E-01
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
```
**Fig. 14.11** Spin oscillation *Sy (turn)* for different distances to the resonance *Gγn* = −6. A greater distance *δn* results in a higher oscillation frequency *ω* = - |*n*| <sup>2</sup> + *δ*<sup>2</sup> *<sup>n</sup>* (Sect. 3.6). On the resonance, the precession axis lies in the median plane, *Sy* oscillation covers [−1*,* 1] and *Sy* = 0


Sample tracking results for *Sy (θ )* oscillation at various distances to the resonance, are given in Fig. 14.11. The average value *Sy* is computed from these tracking data.

The exercise is repeated for the different −10 ≤ *Gγn* ≤ −5 values, resulting in Fig. 14.12 which shows *Sy* dependence on the distance to the resonance so obtained, and fit to Eq. 2.49

$$
\langle S\_{\rm y} \rangle = \frac{\delta\_n}{\sqrt{\epsilon\_n^2 + \delta\_n^2}} \tag{14.5}
$$

The "stationary" column of Table 14.8 has been completed accordingly (Table 14.38).

*Question 14.1.1.8.2*—A 400 keV/turn acceleration rate is taken for the crossing (*V*ˆ = 400 kV, synchronous phase 30◦). The following shows the head and tail of the tracking input data file in the case of *Gγn* = −6 crossing:

```
Booster
'OBJET'
3.77645661e+03 ! Initial rigidity is taken at Ggamma=-5.374744660,
2 ! upstream enough not to feel the resonance at G.gamma=-6.
1 1
0. 0. 0.84273180 1.5602297 0. 1. ' ' ! Track a single 3He, launched on closed orbit.
1
'PARTICUL'
```
**Fig. 14.12** Average value of the vertical spin component *Sy* , depending on the distance to the resonance for the cases of three different resonances *Gγn* = −6*,* −8 and −10. The symbols are from tracking, the solid curves are from the theory (Eq. 2.49). *Sy* = 0 corresponds to *Sy* oscillating over [−1*,* 1], thus the precession axis lies in the median plane, *Gγ* is on resonance

```
HELION
'SPNTRK' ! Start with spin vertical.
3
'FAISTORE'
zgoubi.fai
1
      ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg5.374.inc[SCALING_S,*:SCALING_E,*]
'MARKER' LA1S ! Booster lattice starts here.
'DRIFT' DRIF L057
57.0400
...............
'BEND' DHF8Z SBEN
0 .Bend
1.2096161E+02 0.0000000E+00 7.2121043E-01
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
0.00 0.00 0.00000000
4 .2401 1.8639 -.5572 .3904 0. 0. 0.
1.0000E+00 cm Bend
3 0. 0. 0.
'MARKER' LA2E ! Booster lattice ends here.
'CAVITE'
2
201.78 1.
4.e+05 0.5235987756 ! 400 kV acceleration peak voltage.
'REBELOTE' ! 2000 turns are sufficient to cross the resonance, leaving from away enough
1999 0.1 99 ! ending on the asymtotic region.
'END'
```
The initial *Gγ* is taken at −5.374744660, upstream enough not to feel the resonance at *Gγn* = −6.

Sample results for *Sy (θ )* during resonance crossing are given in Fig. 14.13, for various *Gγn* = *n* values. The resonance strengths are deduced from the respective values of *Pf /Pi*, using (after Eq. 2.44)

$$|\epsilon\_n| = \left(\frac{2\alpha}{\pi} \ln \frac{2}{1 + P\_f/P\_l}\right)^{1/2} \tag{14.6}$$

with *<sup>α</sup>* <sup>=</sup> *dGγ dθ* <sup>=</sup> <sup>9</sup>*.*<sup>484</sup> <sup>×</sup> <sup>10</sup>−<sup>5</sup> being the resonance crossing speed.

**Fig. 14.13** Evolution of the vertical spin component *Sy* during integer resonance crossing, for the cases of *Gγ* = −6*,* −8 and −10

The "crossing" column of Table 14.8 has been completed accordingly (Table 14.38).

### **14.2.1.8 Spin Motion Through Intrinsic Resonances**

Questions 14.1.1.8.1, 2—The systematic resonance at *Gγn* = 0 − *νy* = −4*.*82 is first considered, *Bρ* = 2*.*67875735816T m.

In the stationary case, the spin precession data are obtained by tracking a single particle with a particular vertical invariant value (use OBJET[KOBJ=8]) for many turns (use REBELOTE[NPASS=2000]) at a fixed energy.

The input data file is given in Table 14.41. It is similar to the input data file of Table 14.7, apart from the few necessary changes: modification the setup under OBJET (KOBJ=8 for a single particle with a certain invariant, on-momentum), SPNTRK, and addition of REBELOTE for multi-turn tracking. Note that the SCALING command and its data list, a segment defined in and included as a part of the input data file in Table 14.7, have been saved in the scaling\_GgXXX.inc file, which is subject to an INCLUDE here. This is for the mere purpose of shortness. The values of the scaling coefficients in scaling\_GgXXX.inc have to be updated to the present BORO value, for instance, in this case, from BORO/1000=0.3074552 (Table 14.7) to BORO/1000=2.678757358169758 (Table 14.41).

The turn-by-turn spin motion obtained this way is displayed in Fig. 14.14. The slow oscillation in that graph is that of the vertical component *Sy* (*SZ* in Zgoubi notation). The oscillation frequency is *ω* = - |*n*| <sup>2</sup> + *δ*<sup>2</sup> *<sup>n</sup>* = |*n*|. The amplitude **Table 14.41** Input data file for a 2000-turn tracking of spin motion, at fixed energy in the vicinity of the intrinsic resonance *Gγn* = 0−*νy* = −4*.*82. Note that the SCALING command of Table 14.7 and its data list are subject to an INCLUDE (the scaling\_GgXXX.inc file) for shortness

```
'OBJET'
2.6787573581697584e3
    8
 111
 0. 0. 0. 0. 0. 1.
 0.982907 5.483186 0.
   -1.54525 9.69143 1.3196407949223E-07
 0. 1. 0.
 'PARTICUL'
  HELION
 'SPNTRK'
 4.1
 0. 0. 1.
 'FAISCEAU'
 'PICKUPS'
 1
 #Start
 'FAISTORE'
 zgoubi.fai
 1
 'MARKER' #Start
         ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg4.82.inc[SCALING_S,*:SCALING_E,*]
'INCLUDE'
1
6* superA.inc[superA_S,*:superA_E,*]
'REBELOTE'
 2000 0.2 99
 'END'
```
**Fig. 14.14** Turn-by-turn motion of the three components of a spin, initially vertical. On-resonance here, *Gγ* = *Gγn* = −*νy* , distance to the resonance *δn* = 0. The slow oscillation (the solid curve with a 754 turn period) is that of the vertical component. The high frequency horizontal components (the high frequency dots, featuring the *ω* = |*n*| modulation) both average to zero, since *sπ* precesses about **n**, which itself precesses about the vertical axis

averages to zero ( *Sy* = 0) in this case of being on resonance, since **n** is in the horizontal plane, namely (Eq. 2.48)

$$\delta\_n = 0 \qquad \text{thus} \qquad \left| \mathbf{s}\_{\pi} \right|^2 = \frac{1}{1 + \left( \frac{\delta\_n}{|\epsilon\_n|} \right)^2} = 1 \quad \Rightarrow \left\langle \mathbf{S}\_{\mathbf{y}} \right\rangle = \sqrt{1 - |\mathbf{s}\_{\pi}|^2} = 0$$

The horizontal components *Sx* and *Ss* (*SY* and *SX* in Zgoubi notations) are also displayed (fast oscillatory motion appearing as scattered dots). They oscillate at a much greater frequency *Gγn ω*. They average to zero, since the eigenvector **n** precesses about the vertical axis with a constant projected *ny* component independent of the turn number. Figure 14.15 shows the Fourier spectrum of the motion. On-resonance (*δn* = 0), the oscillation frequency (in units of revolution frequency) is (see Sect. 3.6)

$$\omega \equiv \sqrt{|\epsilon\_n|^2 + \delta\_n^2} \stackrel{\delta\_n=0}{=} |\epsilon\_n| = 1/754 = 0.00133$$

Given that the period of the slow motion in Fig. 14.15 is about 754 turns, the value of 0.00133 is in a good accord with the distance of the peaks in Fig. 14.15 to frac*(Gγn)* = 0*.*82. Two additional distances to the resonance, *δn* = |*n*| and *δn* = 2|*n*|, are displayed in Fig. 14.16.

**Fig. 14.15** Fourier spectrum of the spin motion (horizontal components). The two peaks at 0*.*82± 0*.*00135 are the result of combining the *Gγn* = 4*.*82 frequency of **n** precession about the vertical axis and the - |*n*|<sup>2</sup> + *δ*<sup>2</sup> *<sup>n</sup>* = |*n*| = 0*.*00135 frequency of the spin precession about **n**

**Fig. 14.16** Helion spin precession at *Gγ* = −*νy* in the AGS Booster. *Sy* oscillates slowly (the solid sine waves), frequency *ω*  1. Three different distances to the resonance are plotted: *δn* = 0 (the slow wave with a ±1 amplitude), *δn* = |*n*| and *δn* = 2|*n*| (the fast wave with the smallest amplitude). *Sx* and *Ss* exhibit fast oscillations (dots) at a frequency *Gγn* = 4*.*82 *ω* modulated by the frequency *ω*

Stationary tracking can be repeated for the other three systematic intrinsic resonances. The "stationary" column of Table 14.9 has been completed accordingly (Table 14.39).

Questions 14.1.1.8.3, 4—A 100 keV/turn acceleration rate is taken for crossing (*V*ˆ = 100 kV, synchronous phase 30 deg). However, this is an arbitrary choice. The resonance strength does not depend on the crossing speed, so *V*ˆ is a free parameter.

The four systematic resonance cases, namely, *Gγn* = integer × *M* ± *νy* (M=6 cells), are tracked to fill out Table 14.39. The resonance strengths are deduced from the respective values of *Pf /Pi*, using (after Eq. 2.44)

$$|\epsilon\_n| = \left(\frac{2\alpha}{\pi} \ln \frac{2}{1 + P\_f/P\_l}\right)^{1/2} \tag{14.7}$$

with the resonance crossing speed of *<sup>α</sup>* <sup>=</sup> *dGγ dθ* <sup>=</sup> <sup>2</sup>*.*<sup>371</sup> <sup>×</sup> <sup>10</sup>−5.

The particle invariant is chosen to ensure *Pf /Pi* ≈ 0*.*5, for convenience. For each *Gγn* value, three particles are tracked. They are launched with 2*π/*3 (normalized) betatron phase spacing. It can be observed, however, (Fig. 14.18) that these four different spin motions Sy*(*turn*)* essentially superimpose (this would not be the case above a sufficiently large *εy* value causing substantially different betatron excursions along the ring), which implies, in particular, that the asymptotic *Pf* is independent of the initial *φy* for a given invariant *εy*.

**Fig. 14.17** Particle motion in the vertical phase space over the 2000-turn acceleration range (dots) in the case of |*Gγn*| = *νy* . The particle invariant is damped, from an initial *εy,i/π* to a final *εy,f /π* value. The solid ellipse is the rmsellipse matched to the 2000-turn damped motion

**Fig. 14.18** Crossing of each of the four systematic resonances is displayed here. In each case, three particles are tracked. They are launched with 2*π/*3 (normalized) betatron phase spacing. These three different curves essentially superimpose (they cannot be distinguished on this graph), i.e., *Pf* is independent of the initial *φy* . The starting *Gγ* value is 100 × |*n*| upstream of the resonance. The particle invariant is chosen to ensure *Pf /Pi* ≈ 0*.*5

Particle motion in the vertical phase space is displayed in Fig. 14.17. The motion is damped due to acceleration. The spin motion is displayed in Fig. 14.18. The starting *Gγ* value is taken 100× |*n*| upstream of the resonance, so that the **n** vector is essentially vertical (for a reference: 7 × |*n*| corresponds to cos *φ* = *Sy* = 0*.*99). **Table 14.42** Input data file for a 4504-turn helion ion acceleration across *Gγn* = 0−*νy* = −4*.*82 at a rate of 100 keV/turn. Note that the value of the scaling coefficient in scaling\_GgXXX.inc has to be updated to the present value of BORO/1000=2.12998742

```
4504-turn helion ion acceleration
'OBJET' 1
   2.12998742d3
   8
131
0. 0. 0. 0. 0. 1.
0.982907 5.483186 0.
  -1.54525 9.69143 1.864270E-07
0. 1. 0.
'PARTICUL'
 2.808391586E+03 3.204352974E-19 4.184153800E+00 0. 0.
'SPNTRK'
3
'FAISCEAU'
'PICKUPS'
1
#Start
'FAISTORE'
b_zgoubi.fai #End
1
'MARKER' #Start
       ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg4.596.inc[SCALING_S,*:SCALING_E,*]
'INCLUDE'
1
6* superA.inc[superA_S,*:superA_E,*]
'CAVITE'
3
  201.78004860000 1.00
 1.00000000E+05 5.235987755983E-01
'MARKER' #End
'REBELOTE'
   4503 0.2 99
'END'
```
**Table 14.43** Asymptotic final polarization *Pf* , starting from *Pi* = 1. The particle invariant is damped over the 2000-turn acceleration range, from *εy,i/π* to *εy,f /π*. *εy /π* is twice the final rms *εy /π* value (i.e., the area enclosed by the rms ellipse matched to the damped motion in the phase space)


The input data file for the case *Gγn* = 0 + *νy* is given in Table 14.42. The same file is used for the other three resonances. The only changes are the updated values of BORO under OBJET and of the scaling coefficients in the INCLUDEd file scaling\_GgXXX.inc (namely, the latter are updated to BORO/1000).

Table 14.43 summarizes the asymptotic *Pf* values obtained this way for the four systematic intrinsic resonances, and the resulting resonance strengths |*n*| obtained using Eq. 14.6 with *Pi* = 1. The "crossing" column of Table 14.9 has been completed accordingly (Table 14.39).

### **14.2.1.9 Spin Motion Through a Weak Resonance**

The systematic intrinsic resonance

$$G\gamma\_n = -\nu\_\circ = -4.8201$$

is considered, under fast crossing,

$$\hat{V} = 400\,\text{kV}$$

The tune value *νy* = −4*.*8201 above results from the lattice settings (Sect. 14.2.1.2). Fourier analysis of the multiturn phase space motion displayed in Fig. 14.17 confirms that value.

Compared to the previous simulations, the four times greater acceleration rate here weakens the depolarizing effect. The resonance is made weaker in addition by using a smaller invariant, namely

$$\varepsilon\_{\chi}/\pi \approx 1.03 \times 10^{-8}$$

at the resonance (the invariant damps during acceleration, the starting value is *εy/π* <sup>≈</sup> <sup>1</sup>*.*<sup>3</sup> <sup>×</sup> <sup>10</sup>−<sup>8</sup> m, Table 14.44). The input data file for this tracking is given in Table 14.44, a copy of Table 14.42, mutatis mutandis, namely: with the initial invariant changed to *εy/π* <sup>≈</sup> <sup>1</sup>*.*3×10−<sup>8</sup> under OBJET, the peak voltage changed to *V*ˆ = 400 kV under CAVITE, and NPASS=2000 under REBELOTE. This results in

$$P\_f \approx 0.9906 \text{ } P\_l$$

as can been seen from Fig. 14.19 showing a graph of the turn-by-turn Sy*(*turn*)* motion across the resonance.

Fitting that spin motion Sy*(*turn*)* to the Fresnel integral model (Eq. 2.47)

$$\text{For } \mathbf{y} > 0 \text{ i.e., } \theta > 0 \quad \xrightarrow{\text{downstream of the resonance}} \underbrace{\text{an} \, \text{return} \, \text{an} \, \text{of} \, \text{the resonance}}\_{\text{all}}$$

$$\begin{aligned} \text{For } \mathbf{y} < 0 &\text{ i.e., } \theta < 0\\ \text{positive } \mathbf{y} = -\mathbf{x} &\text{ with } \mathbf{x} > 0 \end{aligned} \to \underbrace{\sin^2 \varphi = \frac{\pi}{a} \, |\epsilon\_n|^2 \left[ (0.5 - C(\mathbf{x}))^2 + (0.5 - S(\mathbf{x}))^2 \right]}\_{\text{upstream of the resonance}}$$

**Table 14.44** Input data file for 2001-turn helion ion acceleration across *Gγn* = −*νy* = −4*.*82 at a rate of 400 keV/turn. Note that the value of the scaling coefficient in scaling\_GgXXX.inc has been updated to the present value of BORO/1000=2.12998742

```
Crossing a weak resonance
 'OBJET'
    2.12998742d3
    8
 131
 0. 0. 0. 0. 0. 1.
 0.982907 5.483186 0.
   -1.54525 9.69143 1.31964E-08
 0. 1. 0.
 'PARTICUL'
  2.808391586E+03 3.204352974E-19 4.184153800E+00 0. 0.
 'SPNTRK'
 3
 'FAISCEAU'
 'PICKUPS'
 1
 #Start
 'FAISTORE'
 zgoubi.fai #End
 1
 'MARKER' #Start
        ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg4.596.inc[SCALING_S,*:SCALING_E,*]
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
 'CAVITE'
 3
   201.78004860000 4.00
  4.00000000E+05 5.235987755983E-01
 'MARKER' #End
 'REBELOTE'
 2000 0.2 99
 'END'
```
yields the respective resonant *Gγ* and normalized resonance strength values (with *εy/π* <sup>=</sup> <sup>1</sup>*.*<sup>03</sup> <sup>×</sup> <sup>10</sup>−<sup>8</sup> m) of

$$|G\gamma\_n| = 4.8202, \quad |\epsilon\_n| / \sqrt{\varepsilon\_\circ/\pi} = \text{5.3}$$

The former quantity is in a good agreement with *νy* = 4*.*8201 from the Fourier analysis of the phase space motion. The latter is in a good accord with the result obtained from the strong resonance simulation crossing, namely (Table 14.39, rightmost column), |*n*|*/ εy/π* = 5*.*2. The Fresnel integral model and the tracking results in the region of the resonance are superimposed in Fig. 14.19.

**Fig. 14.19** A graph of *Sy (*turn = *θ/*2*π )*. The symbols show the tracking results. The solid curve represents the Fresnel integral model

### **14.2.1.10 Beam Depolarization Using a Solenoid**

A perfect Booster lattice is considered here. The integer resonance *Gγ* = −6 is used to move initially vertical spins into the horizontal plane. Spin rotation is performed using either


*Question 14.1.1.10-1*—The input data file for this simulation is given in Table 14.45. Note that the location of the rotator does not make a difference as the modulus of the depolarizing strength, |*n*|, comes in the Froissart-Stora formula. So, for simplicity, the rotator is placed at the beginning of the optical sequence. The solenoidal field, spin tilt angle and energy range have been determined as follows.

Full depolarization after crossing *Gγ* = −6 requires a resonance strength (Eq. 14.6 with *Pf* = 0) of

$$|\epsilon\_n| = \left(\frac{2\alpha}{\pi}\ln 2\right)^{1/2} = 0.0064694573$$

with the crossing speed *<sup>α</sup>* <sup>=</sup> <sup>9</sup>*.*<sup>484842</sup> <sup>×</sup> <sup>10</sup>−<sup>5</sup> (*V*<sup>ˆ</sup> <sup>=</sup> <sup>400</sup> kV, Table 14.45).

**Table 14.45** Input data file for beam depolarization through *Gγ* = −6 using a longitudinal-axis spin rotation (SOLENOID or SPINR). Note that the value of the SCALING coefficients is updated to the present initial BORO/1000=3.7764566118. SCALING ensures that power supply ramping follows the rigidity boost by CAVITE. The latter accelerates from *Bρ* = 3*.*7764566118 T m (*Gγ* = −5*.*374744555), up to *Bρ* = 5*.*92283102938 T m (*Gγ* = −6*.*7454301) in the asymptotic spin rotation region. The INCLUDE file here, scaling\_SOLENOIDadded\_Gg5.374.inc is a copy of scaling\_Gg5.374.inc used in earlier exercises, with SOLENOID added

```
Depolarization by G.gamma=-6, using a longitudinal-axis rotation.
'OBJET'
3.7764566118E3 ! reference rigidity (kG.cm) at start of acceleration (G.gamma=-5.374744555).
2 ! Option for initial coordinates introduced individually.
1 1 ! Track a single particle.
0.01 0. 0. 0.01 0. 1. 'o' ! Small motion to check tunes (closed orbit is nul here).
1
'PARTICUL'
HELION
'SPNTRK'
3 ! Any particle is attributed vertical initial spin vector.
'FAISTORE'
zgoubi.fai ! Log particle data in zgoubi.fai,
1 ! at every pass.
      ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value,
'INCLUDE' ! SOLENOID has to be added to the list if used.
1
scaling_SOLENOIDadded_Gg5.374.inc[SCALING_S,*:SCALING_E,*]
! Two possibilities to simulate spin rotation (uncomment/comment one or the other:
! SOLENOID (give field value) or SPINR (give rotation angle).
! 'DRIFT' ! Compensation for added length.
! -100.
! 'SOLENOID'
! 0
! 100. 1. 0.129 ! This field yields Bs=0.0621T at G.gamma=-6, vs. theoretical 0.0615 T
! 10. 10. ! for beam depolarization.
! 1.
! 1 0. 0. 0.
'SPINR'
1
0 2.36 ! Theoretical angle for depolarization is 2.3290 deg.
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'CAVITE' accelerating cavity
2
201.780048 4.00 circumf., H
400e3 0.523598775598 ! Aceleration rate is 400kV*Q*sin(30deg), Q=2.
'REBELOTE' ! ~19800 passes from beta=0.0655 (Ek=6.043805MeV) to
2300 0.3 99 ! Ggamma=-16 (Ek=7.93076082GeV).
'END'
```
The theoretical solenoid field integral needed to achieve that is obtained from Eq. 2.38 with |*n*| = 0*.*0064694573 and *Bρ* = *Bρn* = 4*.*8139470584T m (*Gγ* = −6), namely

$$B\_{\rm s}L = \frac{2\pi |B\rho\_n|\epsilon\_n|}{1+G} = 0.061454684 \,\text{T m}$$

The dependence of the final polarization on the field integral *BsL* can be expressed as (the Froissart-Stora formula)

$$P\_f = 2\exp\left(-\frac{\pi}{2}\frac{|\frac{1+G}{2\pi B\rho\_n}B\_sL|^2}{\alpha}\right) - 1\tag{14.8}$$

This dependence is plotted in Fig. 14.20.

**Fig. 14.20** A graph of the dependence of the final polarization on *BsL* = *Bs(s) ds* field integral (Eq. 14.8), upon crossing of the integer resonance *Gγ* = −6

The spin rotation angle is maintained constant over the acceleration range, by ramping the SOLENOID field using SCALING (Table 14.45). Its value is

$$
\phi\_{\rm sp}(1+G)\frac{B\_{\rm s}L}{B\rho\_{\rm n}} = -0.040648 \,\text{rad} \,\text{rad} \,\, = \, 2.239^{\circ}
$$

The starting *Gγ* = −5*.*374744555 is at a distance of about 100 × |*n*| from the resonance, which is well away so ensuring absence of depolarizing effects. The spins stay vertical as particles circle around the ring. The final *Gγ* = −6*.*74543 is about 100 × |*n*| downstream of the resonance, in the asymptotic region.

In order for the spins to end up precessing about nearly longitudinal axes with the turn-average *Sy* turn ≈ 0, the respective practical SOLENOID and SPINR settings have to be (these are the settings in the input data file given in Table 14.45),

$$B\_s L = 0.0621 \,\text{T m}, \text{at } G\gamma = G\gamma\_n, \qquad \phi\_{\text{sp}} = 2.36^{\circ}$$

which is reasonably close to the theoretical expectations. The longitudinal field experienced by the particles across the solenoid, when they reached the resonant energy region, is shown in Fig. 14.21.

At this point it is a good idea to ensure that coupling introduced by the solenoid is only a marginal optical perturbation (otherwise, it would have to be compensated). This can be checked with a MATRIX computation, based on the input data file of Table 14.45 (uncomment DRIFT and SOLENOID, comment SPINR, remove or comment CAVITE and REBELOTE, instead add MATRIX[IORD=1,IFOC=11],

**Fig. 14.21** A graph of the SOLENOID longitudinal field *Bs(s)* (*BX(X)* in Zgoubi notations) as experienced by particles in the *Gγ* ≈ *Gγn* = −6 energy region of the acceleration ramp. The plotted data are read from zgoubi.plt. The plateau is at *B*ˆ*<sup>s</sup>* = 0*.*0621 T

use OBJET[KOBJ=5], make sure SOLENOID is added to the SCALING list), yielding the following 1-turn 6 × 6 matrix:


It can be seen that coupling is weak. No compensation is needed in the current simulations.

The spin tracking results for the cases of both SOLENOID and SPINR are displayed in Fig. 14.22. Note that if a more accurate *BsL* value giving precisely *Sy* turn = 0 is desired, as indicated in Fig. 14.20, this can be readily achieved by a linear interpolation between a couple of tracking points near *Bρ* ≈ 0*.*61 ∼ 0*.*62.

*Question 14.1.1.10-2*—The data file for this simulation is the same as for the previous question (Table 14.45) with one change: MCOBJET is used to create a 1000-particle bunch. This requires substitution of OBJET and its data list by the following:


SPINR is used to be closer to the theoretical assumptions addressed in the previous question (by avoiding possible orbital effects associated with SOLENOID). Two

**Fig. 14.22** A graph of *Sy (Gγ )* (*SZ(Gγ )* in Zgoubi notations) through the integer resonance *Gγn* = −6 excited using a 2.36 deg longitudinal-axis spin rotation. The plotted data are read from zgoubi.fai. The Outcomes of both the SOLENOID and SPINR simulation cases are superimposed here, showing a marginal difference

**Fig. 14.23** Graphs of *Sy (*turn*)* , an average over a 1000-particle set (dark curve), together with a few individual *Sy (*turn*)* taken from that random set with various *εx , εy* values, for the two cases (as indicated on the respective graph) of *δp/p* = 0 (no momentum spread) and non-zero random *δp/p*. Spread of the final spin vectors together with a negative offset of *Sy* is apparent in the latter case

different 1000-particle sets have been tracked for comparison, one with *δp/p* = 0 which ends up with the expected *Sy* ≈ 0, and one with a rms Gaussian momentum spread of *σδp/p* <sup>=</sup> <sup>10</sup>−<sup>3</sup> which ends up with *Sy* being slightly negative. The results are presented in Fig. 14.23.

### **14.2.1.11 Introduce a Partial Snake**

*Question 14.1.1.11-1*—The input data file to simulate the Booster lattice including vertical misalignment of the lattice quadrupoles (using ERRORS) and a longitudinal axis snake is given in Table 14.46. The snake simulation uses SPINR (a pure spin precession, no orbital effect) with the spin axis set to longitudinal and the spin precession angle *φ*snake to be determined—see next question.

Integer resonances are excited by a non-zero vertical orbit. Their strengths are displayed in Fig. 14.25 over −12 ≤ *Gγ* ≤ −7, as obtained using the thin lens model series (Eq. 2.29). Strong resonances are at *Gγn* = *pM* ± [*νy* ] = 6 + 5 = 11*,* 2 × 6 ± 5 = 7*,* 17*,* etc. (with [*νy*] = 5 being the nearest integer to the actual *νy* = 4*.*82). Thus, *Gγn* = 7 is the strongest in the acceleration interval of *Gγ* : −6*.*5 → −10*.*5 considered in this exercise. Its theoretical strength (using Eq. 2.29) is | imp *<sup>n</sup>* | = 0*.*0034.

**Table 14.46** Input data file for a simulation of an acceleration cycle in Booster in the presence of a partial snake. The latter uses SPINR. An orbit distortion is created using ERRORS, which causes a random vertical displacement of quadrupoles with an rms value of 0.25 mm and a 3 *σ* cut-off. Note that the values of the SCALING coefficients are updated to the present initial BORO/1000=5.56832079 (*Gγ* = −6*.*5). SCALING ensures that power supply ramps follow the rigidity boost by CAVITE. The latter accelerates from *Gγ* = −6*.*5 to *Gγ* = −10*.*5 in 6500 turns

```
Partial snake to preserve polarization thru integer resonances.
'OBJET'
5.5683207908096621E3 Reference rigidity (kG.cm) (G.gamma=-6.5, here).
2 ! Launch a single
1 1 ! particle, on
0. 0. 2.81903105E-01 4.05298102E-01 0.00 1. 'o' ! closed orbit.
1
'PARTICUL'
HELION
'ERRORS'
1 1 123456 PRINT ! sig_ZS/cm ! PRINT logs error inofs to zgoubi.ERRORS.out.
MULTIPOL{Q*,QUAD} 1 ZS A U 0. .025 3 ! LensFamiliy{LABEL1, LABEL2}.
'SPNTRK'
4.1 ! Particle spin is along stable spin axis, which is,
0. 0. 1. ! vertical as starting G.gamma=-6.5, away from resonance.
'FAISTORE'
zgoubi.fai ! Log particle data in zgoubi.fai,
1 ! at every pass.
      ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg6.5.inc[SCALING_S:SCALING_E] ! SCALING keyword, set for G.gamma=-6.5.
'SPINR' ! Snake, pur spin precession, no orbital effect.
1
0. 1.224 ! Snake axis longitudinal. Change, here, snake angle to 0, 1.224, 2.45 or 12.24.
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'CAVITE' accelerating cavity
2
201.780048 4.00 circumf., H
400e3 0.523598775598 ! Aceleration rate is 400kV*Q*sin(30deg), Q=2.
'REBELOTE' ! ~19800 passes from beta=0.0655 (Ek=6.043805MeV) to
6500 0.3 99 ! Ggamma=-16 (Ek=7.93076082GeV).
'END'
```
**Fig. 14.24** Vertical closed orbit along Booster, with the ERRORS setting as per Table 14.46

**Fig. 14.25** Strengths of integer resonances excited by the orbit distortion displayed in Fig. 14.24

Acceleration through *Gγ* : −6*.*5 → −10*.*5 produces Sy*(*turn*)* displayed in Fig. 14.29 (the case of *φ*snake = 0). The resonances are located at integer *Gγ* values distant by *GΔγ* = 1. Thus, in units of energy (using the particle data from Table 14.1),

$$
\Delta E = \frac{M}{|G|} G\\\Delta \mathcal{Y} = \frac{M}{|G|} = \frac{2808.3916}{4.18415} = 671.2 \text{MeV}
$$

*Question 14.1.1.11-2*—The snake angle is set (under SPINR) to *φ*snake = 2*π*| imp *<sup>n</sup>* | = 2*π* × 0*.*0034 rad = 1*.*224◦, ERRORS is inhibited, the particle data are logged in zgoubi.fai at each optical element along the ring, the reference rigidity is set for *Gγ* = 7 under OBJET and SCALING. The initial spin coordinates are set (to arbitrary values) under SPNTRK, and FIT is used to change them so to reach **S***x,s,y(s* = 0*)* = **S***x,s,y(s* = *send )*. This yields the input data file of Table 14.47.

**Table 14.47** Input data file to find the spin closed orbit at the *Gγn* = 7 resonance (using FIT). It is similar to that of Table 14.46, with the following changes: the reference rigidity is BORO=6.2821070918945 (*Gγ* = 7); ERRORS[ONF=0] inhibits the error generator; ALL is added under FAISTORE, this logs the particle data at the exits of all optical elements along the sequence in zgoubi.fai for further plotting of **S***X,Y,Z(s)*; scaling\_Gg7.inc is INCLUDEd with its scaling coefficients set for |*Gγ* | = 7; FIT finds the periodic orbit (expected null) and the periodic spin orbit, expected to lie in the median plane due to the snake

```
Partial snake to preserve polarization thru integer resonances.
'OBJET'
6.2821070918945E3 reference rigidity (kG.cm).
2 ! Option for initial coordinates introduced individually.
1 1 ! Track a single particle.
0.0 0. 0. 0.0 0. 1. 'o' ! Small motion to check tunes (closed orbit is nul here).
1
'PARTICUL'
HELION
'SPNTRK'
4.1 ! Particle spin is along stable spin axis, which is,
0. 1. 0. ! arbitrarily, along the Y axis, here - FIT will move it to // X-axis.
'ERRORS' ! Inhibited, due to ONF=0.
0 1 123456 PRINT ! sig_ZS/cm ! PRINT logs error inofs to zgoubi.ERRORS.out.
MULTIPOL{Q*,QUAD} 1 ZS A U 0. .025 3 ! LensFamiliy{LABEL1, LABEL2}.
'FAISTORE'
zgoubi.fai ALL ! Log particle data in zgoubi.fai,
1 ! at every pass.
       ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg7.inc[SCALING_S:SCALING_E] ! SCALING keyword, set for G.gamma=-7.
'SPINR' ! Snake, pur spin precession, no orbital effect.
1
0. 1.224 ! Snake axis longitudinal. Change, here, snake angle to 0, 1.224, 2.45 or 12.24.
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'FIT2'
7
1 30 0 [-5,5] ! First 4 lines: vary initial particle coordinates, Y, T, Z, P, iOBJET.
1 31 0 [-5,5]
1 32 0 [-5,5]
1 33 0 [-5,5]
3 10 0 [-1.01,1.01] ! These 3 lines: vary initial spin coordinates, SX, SY, SZ.
3 11 0 [-1.01,1.01]
3 12 0 [-1.01,1.01]
8 1e-10
3.1 1 2 #End 0. 1. 0 ! First 4 lines: request equal particle coordinates at sart and end.
3.1 1 3 #End 0. 1. 0
3.1 1 4 #End 0. 1. 0
3.1 1 5 #End 0. 1. 0
10.1 1 1 #End 0. 1. 0 ! These 3 lines: request equal spin coordinates at sart and end.
10.1 1 2 #End 0. 1. 0
10.1 1 3 #End 0. 1. 0
10 1 4 #End 1. .0001 0 ! Request spin vector modulus =1, with a great weight (0.0001).
'END'
```
**Fig. 14.26** Spin closed orbit along Booster in terms of its azimuthal angle at the *Gγ* = 7 integer resonance. The snake is located at *θ* = 0. The **n**<sup>0</sup> vector lies in the median plane, and undergoes rotation about the Z-axis at a frequency of *ν*sp = *Gγ* : SX (the thick red curve) and SY (blue) oscillate while SZ=0. The theoretical **n**<sup>0</sup> vector components (Eq. 14.9) are superimposed (the dashed curves). At the azimuthal angle of *θ* = *π* rad, which is the location opposite to the snake, the stable spin direction vector is parallel to the longitudinal axis (ns ≡ SX = 1 and nx ≡ SY = 0)

The presence of the snake produces the spin closed orbit displayed in Fig. 14.26. Plotted data are read from zgoubi.fai, generated using FAISTORE[LABEL=ALL], which logs the particle data at the exits of ALL optical elements around the ring (FAISTORE[LABEL=DRIF] would probably be sufficient). The spinor methods (Chap. 3) allow for deriving the eigenvectors

$$\mathbf{n} = \begin{pmatrix} n\_x \\ n\_s \\ n\_\chi \end{pmatrix} = \frac{(\pm)}{\sin \pi \upsilon\_{\rm sp}} \begin{pmatrix} -\sin(G\gamma(\pi-\theta)) \sin \frac{\phi\_{\rm snake}}{2} \\ \cos(G\gamma(\pi-\theta)) \sin \frac{\phi\_{\rm snake}}{2} \\ \sin(G\gamma\pi) \cos \frac{\phi\_{\rm snake}}{2} \end{pmatrix} \tag{14.9}$$

and the spin tune

$$\cos \pi \upsilon\_{\rm sp} = \cos(\pi G \chi) \cos(\pi \epsilon\_{\rm n}) = \cos(\pi G \chi) \cos \frac{\phi\_{\rm snake}}{2} \tag{14.10}$$

On the *Gγ* = 7 resonance, *ny* = 0, the spin closed orbit lies in the median plane. Figure 14.26 shows its theoretical *ns(θ )* and *nx (θ )* components (Eq. 14.9) superimposed on the numerical tracking results (this graph uses the gnuplot script **Table 14.48** A gnuplot script to produce the graph of the numerical and theoretical spin closed orbit vectors around the ring in Fig. 14.26. This script specifies the positions (the column numbers) of the data read from zgoubi.plt

```
set xlabel "{/Symbol q} [rad]" ; set ylabel "n_X, n_Y, n_Z"
set key t r maxrow 5 width -3
pi = 4.*atan(1.) ; deg = 180./pi ; cm = 1e2 ; am = 2808.391585; G = 4.1841538; q = 2.
R = 201.78/ (2.*pi) *cm ; qsi= 1.224/deg ; Gg = 7.
# n_0 components, theory:
SY(x) = -1./sin(acos(cos(pi*Gg)*cos(qsi/2.))) * sin( Gg* (pi -x)) * sin(qsi/2.) # x/e1
SX(x) = 1./sin(acos(cos(pi*Gg)*cos(qsi/2.))) * cos( Gg* (pi -x)) * sin(qsi/2.) # s/e2
SZ(x) = 1./sin(acos(cos(pi*Gg)*cos(qsi/2.))) * sin( Gg* pi) * cos(qsi/2.) # z/e3
set sample 1000
print " Qs = ",acos(cos(pi*Gg)*cos(qsi/2.))/pi,"; 1-Qs = ",1-acos(cos(pi*Gg)*cos(qsi/2.))/pi
plot [] [-1:1] \
"zgoubi.plt" u ($14/R):($33) w p pt 4 ps .4 lc rgb "red" tit "S_X" , SX(x) lw 2. dt 2 lc rgb "red" notit ,\
"zgoubi.plt" u ($14/R):($34) w p pt 4 ps .2 lc rgb "blue" tit "S_Y" , SY(x) lw 2. dt 3 lc rgb "blue" notit ,\
"zgoubi.plt" u ($14/R):($35) w p pt 4 ps .1 lc rgb "black" tit "S_Z" , SZ(x) lw 2. dt 4 lc rgb "black" notit
```
given in Table 14.48). The oscillation frequency (Eq. 14.10 with *φ*snake = 1*.*224◦) is

$$\text{frac}(\nu\_{\text{sp}}) = \frac{\phi\_{\text{sake}}}{2} = 0.0034$$

*Question 14.1.1.11-3*—An input data file to compute the spin closed orbit for *Gγ* = 7, using FIT, is given in Table 14.49. A script (as in Table 14.50) changes the reference rigidity (OBJET[BORO]) and the corresponding SCALING factors in the ancillary file scaling.inc, and the repeats the computation for the sampled −*Gγ* values over [−6*.*5*,* −7*.*5] (Figs. 14.27 and 14.28).

*Question 14.1.1.11-4*—Quadrupolemisalignments are enabled (ERRORS[ONF=1]), the snake angle is set to *φ*snake = 1*.*224◦.

Acceleration through *Gγ* : −6*.*5 → −10*.*5 produces Sy*(*turn*)* displayed in Fig. 14.29 (the case of *φ*snake = 1*.*224◦). The spin appears to be tilted after crossing the integer resonances. However, the snake rotation is too weak to overcome the effect of the vertical orbit distortion.

*Question 14.1.1.11-5*—In order to determine the minimum angle of the snake spin rotation, it is necessary to know the strengths of the resonances to be crossed.

A partial snake generates a spin resonance strength

$$|\epsilon^{\text{sanke}}| = \frac{\phi\_{\text{sanke}}}{2\pi}$$

Upon crossing of the resonance, the ratio of the final and initial polarizations satisfies (the Froissart and Stora formula, Eq. 2.44)

$$\frac{P\_f}{P\_l} = 2e^{-\frac{\pi}{2\alpha}|\epsilon^{\rm snake} + \epsilon\_n^{\rm imp}|^2} - 1$$

**Table 14.49** Input data file to find the spin closed orbit at a *Gγn* resonance (*Gγn* = 7, here) using FIT. FIT finds the spin closed orbit for particle 4, which is *Gγ* dependent (Eq. 14.9). A trick is used here: the first three particles are left out of the fit, they are used to compute the spin matrix (SPNPRT[MATRIX], logged in zgoubi.SPNPRT.Out by SPNPRT[PRINT]) for comparison with the spin closed orbit of particle 4 found by FIT. Additional particles 5 and 6 are dummies and unused. They are only needed for proper operation of SPNPRT[MATRIX], which requires 3-particle subsets

```
spinN0_FIT_template.dat tmeplate input data file
'OBJET'
6.2821070918945E3 ! Reference rigidity (kG.cm) - G.gamma=7, here.
2 ! Option for initial coordinates introduced individually.
6 2 ! Spin MATRIX computation requires 3 times the same particle, with spin SX, SY or SZ.
0. 0. 0. 0. 0. 1. 'o' ! First 3 particles used to compute spin matrix.
0. 0. 0. 0. 0. 1. 'o'
0. 0. 0. 0. 0. 1. 'o'
0. 0. 0. 0. 0. 1. 'o' ! 4th particle used to get spin closed orbit, using FIT.
0. 0. 0. 0. 0. 1. 'o' ! 2 additional particles unused, only needed for proper operation of
0. 0. 0. 0. 0. 1. 'o' ! SPNPRT[MATRIX] as it requires 3-particle subsets.
1111111
'PARTICUL'
HELION
'FAISCEAU'
'SPNTRK'
4
1. 0. 0. ! Initial spins of first 3 particles are left untouched, used to
0. 1. 0. ! compute spin matrix.
0. 0. 1.
1. 0. 0. ! Spin of prtcl 4 varied by FIT, to find spin orbit.
1. 0. 0. ! unused.
1. 0. 0. ! unused.
'INCLUDE'
1 ! scaling.inc is a cpy of scaling_Gg7.inc, scaling factors therein suited to present
scaling.inc[SCALING_S:SCALING_E] ! OBJET[BORO] (they are changed by the repeat scrit).
'SPINR' ! Snake, pur spin precession, no orbital effect.
1
0. 1.224 ! Snake axis longitudinal. Change, here, snake angle to 0, 1.224, 2.45 or 12.24.
'INCLUDE'
1
6* superA.inc[superA_S:superA_E]
'FIT2'
3
4 40 0 [-2.0,2.0] ! These 3 lines: vary initial spin coordinates SX, SY, SZ of prtcl 4.
4 41 0 [-2.0,2.0]
4 42 0 [-2.0,2.0]
4 1e-20
10.1 4 1 #End 0. 1. 0 ! These 3 lines: request equal spin coordinates at sart and end.
10.1 4 2 #End 0. 1. 0
10.1 4 3 #End 0. 1. 0
10 4 4 #End 1. .0001 0 ! Request spin vector modulus =1, with a great weight (0.0001).
'FAISCEAU' ! Allows to check final particle coordinates (perfect ring: should all be zero).
! In the following: spin closed orbit from spin MATRIX (computed using particles 1-3) is
! stored in zgoubi.SPNPRT.Out. It is expected to confirm spin closed orbit for particle 4,
! computed using FIT.
'SPNPRT' MATRIX PRINT
'END'
```
Note: the overall strength snake <sup>+</sup>  imp *<sup>n</sup>* results from a combination of the longitudinal and radial perturbative terms *λs Bs By*<sup>0</sup> and *λx Bx By*<sup>0</sup> in Eq. 2.26, with the *Bs* contribution coming from the snake and *Bx* arising from the vertical orbit in the quadrupoles.

Thus, for the snake to dominate the spin resonance dynamics, one needs

$$\left|\epsilon^{\text{snake}}\right| \gg \left|\epsilon\_n^{\text{imp}}\right|.$$

**Table 14.50** A Fortran script to repeat the orbit finding of Table 14.49, for sampled values *Gγ* : −6*.*5 → −7*.*5. When the scan is completed, gnuplot\_SPNPRT\_N0-Qs-fromFIT.gnu (Table 14.51) is executed

```
character(300) cmnd; character(12) txt12
 parameter (c = 2.99792458e8)
 G = 4.1841538; am = 2808.391585; q = 2.
 Gg0=6.5; N = 60
 dGg = 1./float(N-1); Gg0=Gg0 -dGg
 do i = 1, N
   Gg = Gg0 + dGg*float(i); gma = Gg/G
   p = sqrt((gma*am)**2 - am**2); brho = p/c/q *1e6
   cmnd='cp -f spinN0_FIT_template.dat spinN0_FIT.dat'
   call system(cmnd)
   cmnd='cp -f spinN0_FIT_template.dat spinN0_FIT.dat'//
> " ; sed -i 's@6.2821070918945@"//txt12//"@g' spinN0_FIT.dat"
   call system(cmnd)
   cmnd='cp -f scaling_Gg7.inc scaling.inc'//
> "; sed -i 's@6.2821070918945@"//txt12//"@g' scaling.inc"
   call system(cmnd)
   cmnd = '/home/meot/zgoubi/SVN/current/zgoubi/zgoubi'
> //' -in spinN0_FIT.dat ; '
> //'/home/meot/zgoubi/current/toolbox/rzgRevision ; '
> //'cat zgoubi.SPNPRT.Out >> zgoubi.SPNPRT.Out_cat'
   call system(cmnd)
 enddo
 call system('gnuplot <./gnuplot_SPNPRT_N0-Qs-fromFIT.gnu')
 stop
 end
```
**Table 14.51** Typical gnuplot commands to obtain graphs of spin tune and spin closed orbit components from particle 4 data logged in zgoubi.SPNPRT.Out during tracking

```
# Spin tune vs. G.gamma:
am = 938.27203; G = 1.79284735
plot "zgoubi.SPNPRT.Out_cat" u ($21==1 ? abs($18)/G*am/1e3 : 1/0):($51) axes x2y1 w lp ps 0.6 lw 0.
pause 3
# Spin closed orbit components vs. G.gamma:
Nprtcl = 4
plot \
"zgoubi.SPNPRT.Out_cat" every 1 u ($21==Nprtcl? abs($18): 1/0):( $13) w p pt 4 ps .6 lc rgb "red" tit "n_Y" ,\
"zgoubi.SPNPRT.Out_cat" every 1 u ($21==Nprtcl? abs($18): 1/0):(-10*$14) w p pt 5 ps .6 lc rgb "blue" tit "10 n_Y" ,\
"zgoubi.SPNPRT.Out_cat" every 1 u ($21==Nprtcl? abs($18): 1/0):( $15) w p pt 6 ps .6 lc rgb "black" tit "n_Z"
pause 3
```
This is qualitatively verified in Fig. 14.29, which displays motion of the spin of a particle traveling along the vertical closed orbit, while it is accelerated over *Gγ* : −6*.*5 → −10*.*5: a snake precession of 10 × 2*π*| imp *<sup>n</sup>* | = 12*.*2◦ allows overcoming the resonances by causing a full flip at each integer *Gγ* value. The lower values of *φ*snake = 2*π*| imp *<sup>n</sup>* | = 1*.*22◦ and *φ*snake = 2 × 2*π*| imp *<sup>n</sup>* | = 2*.*45◦ are too weak for spin flipping.

**Fig. 14.27** *Gγ* dependence of the spin closed orbit, over 6*.*5 *<* |*Gγ* | *<* 7*.*5 (left), and a zoomedin view of the central region (right). The symbols are from spin tracking, the solid lines are from the theory (Eq. 14.9 wherein *ns,x,y* corresponds to the present Zgoubi notation *nX,Y,Z*). Note the value of the *nY* component at half-integer *Gγ* of *nx* ≡ *nY* = 0*.*01068 enhanced by a factor 10 for accuracy (with the theoretical *nx* given by Eq. 14.9)

**Fig. 14.28** *Gγ* dependence of the spin tune, over 6*.*5 *<* |*Gγ* | *<* 7*.*5, and a zoom-in of the central region. The symbols are from spin tracking, the solid lines are from the theory (Eq. 14.10). The width of the forbidden spin tune region, or "spin tune gap", is the resonance strength, or resonance width, *n* = *φ*snake*/*2*π* = 0*.*0034

### **14.2.1.12 Introduce Full Snakes**

A non-zero vertical invariant is accounted for. It causes betatron motion through the lattice fields exciting systematic intrinsic spin resonances, which, given *νy* = 4*.*82, are located at *Gγ* = −12 + *νy* = −7*.*18, −6 − *νy* = −10*.*82, −18 + *νy* = −13*.*18.

The same vertical closed orbit distortion as in exercise 14.2.1.11 is introduced, using ERRORS with the same data.

*Question 14.1.1.12-1*—The methods here are very similar to what is done in 14.2.1.11. The spin closed orbit is found using the same input data file (Table 14.47). The FIT procedure in that file simultaneously finds the particle closed obit *(x*0*, x* 0*, y*0*, y* <sup>0</sup>*)* (*(Y*0*, T*0*, Z*0*, p*0*)* in Zgoubi notation), and the spin closed orbit (which by definition is that of the particle on closed orbit). Thus, that FIT procedure holds for chromatic closed orbits. All that needs be changed is the particle D value

**Fig. 14.29** Spin motion over *Gγ* : −6*.*5 → −10*.*5, for the cases of 4 different snake precession angles: null, *φ*snake = 2*π*| imp *<sup>n</sup>* | = 1*.*22◦, 2 × 2*π*| imp *<sup>n</sup>* | = 2*.*45◦, and 10 × 2*π*| imp *<sup>n</sup>* | = 12*.*2◦, with | imp *<sup>n</sup>* | = 0*.*0034 being the strength of the imperfection resonance excited by vertical quadrupole misalignments. The initial spin is along the vertical stable spin direction at *Gγ* = −6*.*5

(relative momentum) under OBJET. The closed orbits of interest here are detailed below.

The one-turn spin matrix, and thus the spin tune, the local spin precession axis at the start of the sequence, etc., can be computed using SPNPRT[MATRIX]. Computation of the spin matrix at different momenta requires defining groups of momenta, using OBJET[KOBJ=2,IDMAX=3]. The input data file used is given in Table 14.52. It defines 3 respective groups of *<sup>D</sup>* <sup>−</sup> <sup>1</sup> <sup>=</sup> *dp/p*<sup>0</sup> <sup>=</sup> <sup>0</sup>*,* <sup>10</sup>−4*,* <sup>10</sup>−3. SPNPRT[MATRIX] manages that information and produces the corresponding 3 one-turn spin matrices. Excerpts from zgoubi.res given in Table 14.53 detail the momentum dependence of the numerical parameter values. At *Gγ* = −6*.*5, the spin closed orbit at the snake is along the transverse horizontal axis, and is longitudinal at the azimuthal angle opposite to the snake, as seen in the following excerpts from zgoubi.res:

– at the snake (s=0.57 m, the end of the first drift, element number 12 in the optical sequence):


**Table 14.52** Input data file to compute the one-turn spin matrices for 3 different momenta, *D* = *p/p*<sup>0</sup> = 1*,* 1*.*0001*,* 1*.*001. In order to produce the respective matrices, SPNPRT[MATRIX] requires defining 3 groups of momenta in the proper order. This can be achieved using OBJET[KOBJ=2,IDMAX=3]. The same particle coordinates are repeated three times in each group. Then SPNTRK sets the three initial spin vectors to (1,0,0), (0,1,0), and (0,0,1), respectively

```
Full snake to preserve polarization thru integer resonances.
'OBJET'
5.5683207908096621E3 Reference rigidity (kG.cm) (G.gamma=-6.5, here).
2
9 3 ! 9 particles, 3 different momenta.
0. 0. 2.81903105E-01 4.05298102E-01 0. 1. 'o' ! On-momentum closed orbit, dp/p=0.
0. 0. 2.81903105E-01 4.05298102E-01 0. 1. 'o'
0. 0. 2.81903105E-01 4.05298102E-01 0. 1. 'o'
7.4360716E-03 -1.0564233E-02 0.2809611 0.4040692 0. 1.0001 'd' ! closed orbit, dp/p=1e4.
7.4360716E-03 -1.0564233E-02 0.2809611 0.4040692 0. 1.0001 'd'
7.4360716E-03 -1.0564233E-02 0.2809611 0.4040692 0. 1.0001 'd'
7.4744578E-02 -0.1053352 0.2727098 0.3932872 0. 1.001 'd' ! closed orbit, dp/p=1e3.
7.4744578E-02 -0.1053352 0.2727098 0.3932872 0. 1.001 'd'
7.4744578E-02 -0.1053352 0.2727098 0.3932872 0. 1.001 'd'
111111111
'PARTICUL'
HELION
'ERRORS'
1 1 123456 PRINT ! sig_ZS/cm ! Vertical alignment random error, uniform.
MULTIPOL{Q*,QUAD} 1 ZS A U 0. .025 3 ! LensFamiliy{LABEL1, LABEL2}.
'SPNTRK'
4 ! SX, SY, SZ spin values of the 3*3 particles.
1. 0. 0.
0. 1. 0.
0. 0. 1.
1. 0. 0.
0. 1. 0.
0. 0. 1.
1. 0. 0.
0. 1. 0.
0. 0. 1.
'FAISTORE'
zgoubi.fai ! Log particle data in zgoubi.fai,
1 ! at every pass.
       ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg6.5.inc[SCALING_S:SCALING_E] ! SCALING keyword, set for G.gamma=-6.5.
'SPINR'
1
0. 180. ! Snake axis longitudinal. Full snake.
'INCLUDE' ! Include Booster ring.
1
6* superA.inc[superA_S:superA_E]
'FAISCEAU'
'SPNPRT' MATRIX
'END'
```
– at the azimuthal location opposite to the snake (s=100.9 m away, element number 330 in the optical sequence):

330 Keyword, label(s) : DRIFT DRIF L057 Drift, length = 57.04000 cm TRAJ #1 IEX,D,Y,T,Z,P,S,time : 1 0. 2.708E-05 -5.847E-05 -3.839713E-01 -3.940313E-01 1.0146044E+04 4.42247E-01 TRAJ #1 SX, SY, SZ, |S| : 1 9.999388E-01 -1.416886E-05 1.106666E-02 1.000000E+00 Cumulative length of optical axis = 101.460424 m ; Time (for reference rigidity & particle) = 4.422465E-07 s

*Question 14.1.1.12-2*—Acceleration over *Gγ* : −6*.*5 → −13*.*5 uses the input data file given in Table 14.54. It is similar to that of Table 14.46 but with **Table 14.53** SPNPRT[MATRIX] listing in zgoubi.res (excerpts): one-turn spin matrices and other information, at relative momenta *<sup>D</sup>* <sup>−</sup> <sup>1</sup> <sup>=</sup> *dp/p*<sup>0</sup> <sup>=</sup> <sup>0</sup>*,* <sup>10</sup>−4*,* <sup>10</sup>−3*,* <sup>10</sup>−<sup>2</sup>

```
                 Momentum group #1 (D= 1.000000E+00) ; average over 3 particles at this pass :
               Spin transfer matrix, momentum group # 1 :
       -0.999945 8.562650E-06 -1.050193E-02
        6.942346E-05 0.999983 -5.794851E-03
        1.050171E-02 -5.795260E-03 -0.999928
Trace = -0.9998897078, ; spin precession acos((trace-1)/2) = 179.3982765528 deg
Precession axis : (-0.0000, -1.0000, 0.0029) -> angle to (X,Y) plane, angle to X axis : 0.1660, 90.3855 degree
Spin tune Qs (fractional) : 0.49833
                 ----------------------------------------------------------------------------------
                 Momentum group #2 (D= 1.000100E+00) ; average over 3 particles at this pass :
               Spin transfer matrix, momentum group # 2 :
       -0.999943 -2.383130E-03 -1.045329E-02
       -2.322598E-03 0.999980 -5.799063E-03
        1.046690E-02 -5.774451E-03 -0.999929
Trace = -0.9998905823, ; spin precession acos((trace-1)/2) = 179.4006668061 deg
Precession axis : ( 0.0012, -1.0000, 0.0029) -> angle to (X,Y) plane, angle to X axis : 0.1658, 67.8736 degree
Spin tune Qs (fractional) : 0.49834
                 ----------------------------------------------------------------------------------
                 Momentum group #3 (D= 1.001000E+00) ; average over 3 particles at this pass :
               Spin transfer matrix, momentum group # 3 :
       -0.999664 -2.391167E-02 -1.002755E-02
       -2.385398E-02 0.999698 -5.834018E-03
        1.016403E-02 -5.592859E-03 -0.999933
Trace = -0.9998980571, ; spin precession acos((trace-1)/2) = 179.4215005685 deg
Precession axis : ( 0.0119, -0.9999, 0.0029) -> angle to (X,Y) plane, angle to X axis : 0.1637, 13.4539 degree
Spin tune Qs (fractional) : 0.49839
                 ----------------------------------------------------------------------------------
                 Momentum group #4 (D= 1.010000E+00) ; average over 3 particles at this pass :
               Spin transfer matrix, momentum group # 4 :
       -0.971396 -0.237373 -6.677918E-03
       -0.237335 0.971409 -5.970173E-03
        7.904151E-03 -4.214493E-03 -0.999960
Trace = -0.9999460691, ; spin precession acos((trace-1)/2) = 179.5792323606 deg
Precession axis : ( 0.1195, -0.9928, 0.0026) -> angle to (X,Y) plane, angle to X axis : 0.1469, 1.2291 degree
Spin tune Qs (fractional) : 0.49883
```
OBJET[KOBJ=8] to generate a few particles on a matched ellipse with a given invariant (to study the dependence of the spin motion on the betatron motion), and with the number of turns increased to 11750 under REBELOTE so to reach *Gγ* = −13*.*5.

The results are displayed in Fig. 14.30. The initial spins are along the transverse horizontal axis (Y, in Zgoubi notation), which is the orientation of the local spin closed orbit. No polarization loss is observed the stable spin direction exhibits rotation about the vertical axis.

**Table 14.54** Input data file for a simulation of an acceleration cycle in Booster in the presence of a single full snake. The latter implemented using SPINR. An orbit distortion is created using ERRORS, which causes random vertical displacements of the quadrupoles with an rms value 0.25 mm and a 3-*σ* cut-off. Note that the values of the SCALING coefficients are updated to the present initial BORO/1000=5.56832079 (*Gγ* = −6*.*5). SCALING ensures that power supply ramps follow the rigidity boost by CAVITE. The latter accelerates from *Gγ* = −6*.*5 to *Gγ* = −13*.*5 in 11700 turns. The initial coordinates are taken on a matched ellipse with a normalized *εy* = 2*.*5 *πμ*m

```
Full snake to preserve polarization thru integer resonances.
'OBJET'
5.5683207908096621E3 Reference rigidity (kG.cm) (G.gamma=-6.5, here).
8
131
0. 0. 2.81903105E-03 4.05298102E-04 0.00 1. 'o' ! closed orbit.
0.982907 5.483186 0.
0. 1. 0.
'PARTICUL'
HELION
'ERRORS'
1 1 123456 PRINT ! sig_ZS/cm ! Vertical alignment random error, uniform.
MULTIPOL{Q*,QUAD} 1 ZS A U 0. .025 3 ! LensFamiliy{LABEL1, LABEL2}.
'SPNTRK'
4.1
0. 1. 0. ! Initial particle spins.
'FAISTORE'
zgoubi.fai ! Log particle data in zgoubi.fai,
1 ! at every pass.
      ! Scaling coefficients in scaling_GgXXX.inc are updated to present BORO/1000 value.
'INCLUDE'
1
scaling_Gg6.5.inc[SCALING_S:SCALING_E] ! SCALING keyword, set for G.gamma=-6.5.
'SPINR'
1
0. 180. ! Snake axis longitudinal. Full snake.
'INCLUDE' ! Booster lattice.
1
6* superA.inc[superA_S:superA_E]
'CAVITE' accelerating cavity
2
201.780048 4.00 circumf., H
400e3 0.523598775598 ! Aceleration rate is 400kV*Q*sin(30deg), Q=2.
'REBELOTE' ! ~19800 passes from beta=0.0655 (Ek=6.043805MeV) to
11750 0.3 99 ! Ggamma=-16 (Ek=7.93076082GeV).
'FAISCEAU' ! Log local particle data to zgoubi.res.
'SPNPRT' ! Log local spin data to zgoubi.res.
'END'
```
*Question 14.1.1.12-3*—Horizontal motion is added: 9 particles are launched with normalized *εx* = *εy* = 2*.*5 *πμ*m and 9 combinations of the initial betatron phases, by ad hocmodification of OBJET[KOBJ=8]:

```
'OBJET'
5.5683207908096621E3 Reference rigidity (kG.cm) (G.gamma=-6.5, here).
8
331
0. 0. 2.81903105E-03 4.05298102E-04 0.00 1. 'o' ! closed orbit.
0.982907 5.483186 3.e-6
0. 1. 0.
```
The results are essentially unchanged. Motion of the spins is similar to that in Fig. 14.30 found earlier.

**Fig. 14.30** Evolution of the stable spin direction adiabatically followed by the spins, as observed at the snake (the mid-plane components *SX* and *SY* versus *Gγ* ) (left), and the (marginal) vertical component (*SZ* versus *Gγ* ) (right), during acceleration over *Gγ* : −6*.*5 → −13*.*5, in the presence of a single full snake. Three particles are tracked, with different initial betatron phases on the same matched phase-space ellipse with a normalized invariant *εY* = 2*.*5 *π*µm. Their spin trajectories overlap. The initial spins are along the *Y* axis corresponding to the local spin closed orbit at *Gγ* = −6*.*5

### **14.2.1.13 Preserve Polarization Using Tune Jump**

*Question 14.1.1.15-1*—For a 100 kV RF voltage the crossing speed is

$$\frac{dG\,\nu}{d\theta} = 2.37121051717 \times 10^{-8}$$

Given the tune *νZ* = 0*.*82, the acceleration rate and the energy at the start of the tracking, the resonance |*Gγ* | = 0 + *νZ* occurs at a turn number

$$N\_{0+\nu\_{\mathcal{V}}} \approx 1530$$

The resonance strength *n* is in question. It can be determined from the particle invariant using Table 14.39. Given *<sup>n</sup>* and the crossing speed *<sup>α</sup>* <sup>=</sup> *dGγ dθ* , the Froissart-Stora formula (Eq. 2.44) yields the expected asymptotic polarization after crossing of

$$P\_f \approx 0.53$$

A numerical simulation of this resonance crossing yields the result displayed in Fig. 14.31 and confirms the expected *Pf* ≈ 0*.*53.

*Question 14.1.1.15-2*—The new crossing speed, including the effect of the tune jump, is (Eq. 14.2)

$$\alpha = 2.60504500631 \times 10^{-4}$$

With this increased crossing speed, the Froissart-Stora formula yields an expected final polarization of

$$P\_f = 0.9234742$$

This theoretical value agrees with the value obtained from a crossing simulation within 0.03%. The result of the latter is displayed in Fig. 14.31.

### **14.2.1.14 Preserve Polarization Using an AC Dipole**

With the scale\_factor set to 0.0, tracking a 32 particle set yields an average *Pf* = 41*.*5%, compared to the expectation of *Pf* = 40*.*0%. With the scale factor set to 5 G, tracking the 32 particle set yields *Pf* = −50%. An AC dipole field of *Bm* = 12*.*2 G allows a full spin-flip.

The tracking results are displayed in Fig. 14.32.

# *14.2.2 Electron Spin Dynamics, Synchrotron Radiation*

### **14.2.2.1 Electron Equilibrium Emittances and Energy Spread**

*Question 14.1.2.1-1*—Figure14.33 shows the optical functions and the orbit of a perfectly aligned AGS Booster ring. It was generated by a Gnuplot script (Table 14.14) using the Zgoubi Twiss output following the question's instructions in Sect. 14.1.2.1. The Twiss output file contains a table of the Twiss functions specified at the end of each element in the lattice. An easy way to find the damped equilibrium emittances, energy spread and damping times of 10 GeV electrons in this lattice is to open the output text file in a spreadsheet and then evaluate the integrals in the expressions for the equilibrium parameters given in Chap. 6. We can calculate approximate integral values by summing the integrand expressions over all elements. This is an accurate approximation in our case, since the Twiss functions do not change significantly over a single element. The resulting equilibrium parameters are summarized in Table 14.55.

**Fig. 14.33** Left: twiss optical functions of the entire AGS Booster ring. Right: orbit in the AGS Booster ring with perfect element alignment

**Table 14.55** Electron beam parameters


*Question 14.1.2.1-2*—The SRPRNT keyword at the end of the code in Table 14.16 activates printout of the SR loss statistics in zgoubi.res output file. An excerpt of zgoubi.res file showing the SR information is:


As one can see, the average particle energy loss per turn obtained in the Monte-Carlo simulation is in a good agreement with the theoretical prediction in Table 14.55. One must restore this energy loss at a synchronous phase necessary for longitudinal stability. Therefore, the cavity voltage amplitude is |*V*ˆ | = *ΔE/q/* sin *φs* = 127*.*6 MV. This number is consistent with the rf cavity setting under CAVITE in Table 14.17, namely *V*ˆ = 122*.*345MV. The cavity setting is slightly lower than the theoretical prediction because it accounts for the change in the particle energy as it moves around the ring.

*Question 14.1.2.1-3*—The initial beam distribution in Table 14.17 is generated on a matched vertical phase-space ellipse, using OBJET[KOBJ=8]. The ellipse parameters are specified by the appropriate option of the OBJET element using the Twiss functions at the start point and the beam emittances. The matched Twiss function values were taken from the Twiss table that was generated as a result of Question 14.1.2.1-1. For simplicity, the horizontal emittance was set to zero while the vertical emittance was set to a relatively large value of 10*μ*rad for synchrotron damping demonstration. After running the simulation and analyzing, plotting and fitting the resulting data as described in the question's statement in Sect. 14.1.2.1, we obtain evolution of the vertical beam emittance as a function of the turn number shown in Fig. 14.34. The vertical emittance *εy* is obtained from the rms beam size *σy* as *εy* <sup>=</sup> *<sup>σ</sup>*<sup>2</sup> *<sup>y</sup> /βy*.

An exponential fit to the simulation data in Fig. 14.34 gives a vertical emittance damping time of 155.3 turns. Note that the equations of Chap. 6 and the values listed in Table 14.55 are for the amplitude damping times rather than the emittance ones. Since the emittance is proportional to the second power of the betatron amplitude, the vertical betatron amplitude damping time is a factor of two longer than the vertical emittance one and equals 310.6 turns. Given the electron circulation frequency in the AGS Booster listed in Table 14.55, this number corresponds to 0.209 ms, which is in a good agreement with the theoretical prediction of 0.211 ms in Table 14.55.

**Fig. 14.34** Damping of the vertical emittance of a 10 GeV electron beam in the AGS Booster lattice. Note a good agreement of the exponential fit with the Monte-Carlo data for only 100 electrons

### **14.2.2.2 Spin Diffusion Studies**

### **14.2.2.3 Spin Diffusion**

*Question 14.1.2.2-1*—Here is an excerpt of zgoubi.res file showing the spin transfer matrix, **n**<sup>0</sup> and spin tune:

```
Spin transfer matrix, momentum group # 1 :
       -0.345661 -0.938359 0.00000
        0.938359 -0.345661 0.00000
         0.00000 0.00000 1.00000
Trace = 0.3086770996, ; spin precession acos((trace-1)/2) = 110.2221783671 deg
Precession axis : ( 0.0000, 0.0000, 1.0000) -> angle to (X,Y) plane, angle to X axis : 90.000, 90.000 degree
Spin tune Qs (fractional) : 3.0617E-01
```
As one can see, in a perfectly aligned lattice, **n**<sup>0</sup> is exactly vertical.

*Question 14.1.2.2-2*—The electron polarization is plotted against the turn number in Fig. 14.35. It was obtained by tracking 100 electrons through a perfectly aligned AGS Booster lattice with synchrotron radiation enabled. At the start, the electron spins were set along the **n**<sup>0</sup> axis. Figure 14.35 illustrates that in a perfectly aligned ring, there is no detectable polarization degradation on this time scale even when synchrotron radiation is present, i.e. the spin diffusion rate is zero within our numerical precision. This case presents interest primarily as a sanity check of the spin tracking code. It confirms that at this level, the code does not introduce unphysical spin effects.

*Question 14.1.2.2-3*—The 4D transverse closed orbit offset *(Y T Z P )* caused by a 1 mm vertical misalignment of the "QVA1" quadrupole is


**Fig. 14.35** Polarization of 100 electrons as a function of the turn number in a perfectly aligned AGS Booster ring with synchrotron radiation enabled. The electron spins are initially aligned with the **n**<sup>0</sup> axis

The **n**<sup>0</sup> axis at the beginning of this perturbed lattice is

(0.0137, -0.0568, 0.9983)

Time evolution of the polarization in this case is compared to that of the perfectly aligned case of Question 14.1.2.2-2 in Fig. 14.36. An exponential fit to the data gives a spin diffusion time of 17*.*<sup>9</sup> · <sup>10</sup><sup>3</sup> turns corresponding to 12 ms. Note the rapid spin diffusion caused by misalignment of even a single element.

*Question 14.1.2.2-4*—Similarly to the solution of Question 14.1.2.2-3, we find that vertical misalignments of "QVA1" by 2 and 5 mm result in transverse closed orbit shifts of

```
and
```
respectively. The corresponding **n**<sup>0</sup> axes are

(0.0273, -0.1132, 0.9932)

and

(0.0660, -0.2769, 0.9586) .

Note that the closed orbit offset and the *x* and *y* components of **n**<sup>0</sup> scale linearly with the size of the misalignment as expected. The polarization behavior in these two cases is plotted as a function of the turn number in Fig. 14.36. Exponential fits to these data give spin diffusion times of 6*.*<sup>4</sup> · <sup>10</sup><sup>3</sup> and 800 turns, or 4.3 and 0.54 ms, for the 2 and 5 mm misalignment scenarios, respectively.

**Fig. 14.36** Polarization of 100 electrons as a function of the turn number in the AGS Booster lattice for 0, 1, 2, and 5 mm vertical offsets of the first "QVA1" quadrupole. Synchrotron radiation is enabled. The electron spins in each case are initially aligned with the corresponding **n**<sup>0</sup> axis

In a perfectly aligned lattice without transverse coupling, particles with different momentum offsets *δ* experience only vertical bending and focusing magnetic fields. Therefore, the precession axes of all particles **n***(δ)* are aligned with the same vertical **n**<sup>0</sup> axis. Change in momentum of a particle due to emission of a synchrotron radiation photon does not change the direction of its **n***(δ)* and causes no polarization loss as illustrated by Question 14.1.2.2-2. In case when the closed orbit experiences vertical excursion, the radial fields of the focusing quadrupoles tilt **n**<sup>0</sup> from the vertical. The amount of this tilt is momentum dependent thus resulting in a spread of the **n***(δ)* directions for different *δ*. Emission of a synchrotron radiation photon changes the direction of **n***(δ)* and only the component of the original spin direction along the new **n***(δ)* is preserved. The greater the change in **n***(δ)*, the smaller the fraction of the spin that is preserved and thus the higher the spin diffusion rate. Greater misalignments lead to greater closed orbit distortion and subsequently greater deviation of **n**<sup>0</sup> from the vertical, greater **n***(δ)* spread and finally greater spin diffusion rate as demonstrated in Question 14.1.2.2-4.

### **14.2.2.4 Suppression of Spin Diffusion**

*Question 14.1.2.2-5*—Both lattices considered in this exercise consist of a solenoid followed by two dipoles and then another solenoid. Both schemes are simplified versions of an electron spin rotator, a device rotating the electron polarization from vertical to longitudinal and then back. Such an insertion is needed to provide longitudinal polarization in the experimental section without causing fast spin diffusion in the arcs. The first solenoid rotates the polarization about the longitudinal axis from positive vertical to positive radial. The subsequent dipole rotates the polarization about the vertical axis from positive radial to positive longitudinal. The difference between the two schemes is in how the polarization is returned back to positive vertical. In the first scenario, the second dipole bends the beam in the same direction as the first one and continues polarization rotation in the same direction from positive longitudinal to negative radial. The second solenoid has the same field polarity as the first one. It rotates the polarization from negative radial to positive vertical. This dynamics can be graphically summarized as

$$\uparrow \text{ Selenoid} \odot \text{ Dipole} \to \text{ Dipole} \otimes \text{Selenoid} \uparrow. \tag{14.11}$$

In the second scenario, the polarities of the second dipole and solenoid are reversed resulting in the following rotation sequence

$$
\uparrow \quad \text{Solonid} \odot \text{ Dipole} \to \text{Anti} - \text{Dipole} \odot \text{Anti} - \text{Solonid} \uparrow. \tag{14.12}
$$

In both cases, the polarization is positive vertical at the entrance and exit. From geometrical point of view, the first arrangement causes 138.4 mrad net orbital bend while the second configuration has zero net bend.

*Question 14.1.2.2-6*—The field and spin components along the reference trajectories of the two spin rotator configurations are shown in Figs. 14.37 and 14.38, respectively. These graphs demonstrate implementation of the design philosophy described in the solution to Question 14.1.2.2-5.

*Question 14.1.2.2-7*—Figure14.39 shows the electron vertical spin component at the end of the spin rotator as a function of the particle's relative momentum offset. The momentum dependencies are compared for the two spin rotator configurations. In this study, different-momentum electrons with initially vertical spins were launched on the design orbit at the beginning of the spin rotator and tracked to its end. As we can see, the spin effects of the two rotator designs are equivalent for the on-momentum particles resulting in a perfect restoration of the vertical spin at the end. However, there are significant differences for the off-momentum particles. The

**Fig. 14.37** Left: field components along the reference trajectory in the same-field-polarity design. Right: field components along the reference trajectory in the reversed-field-polarity design

**Fig. 14.38** Left: spin components along the reference trajectory in the same-field-polarity design. Right: spin components along the reference trajectory in the reversed-field-polarity design

**Fig. 14.39** Final vertical spin component as a function of the particle's relative momentum offset for the same-field- (Scheme 1) and reversed-field-polarity (Scheme 2) spin rotator configurations

reversed-field-polarity design demonstrates a much weaker momentum dependence of the final spin. The remaining dependence is due to dispersion that has not been accounted for in this simplified scheme.

The spin precession in each of the spin rotator elements is of course momentum dependent. The spin rotation of an off-momentum electron deviates from that of the reference particle. In the same-field-polarity configuration, this deviation accumulates from magnet to magnet resulting in a relatively large tilt of the spin at the end. In the opposite-field-polarity configuration, the spin deviation accumulated in the first half of the spin rotator is precisely compensated by the matching opposite-field magnets in the second half causing equal-size opposite-direction spin rotations. As we demonstrated in the solution to Question 14.1.2.2-4, greater deviation of the spin from vertical in the arcs results in a higher spin diffusion rate. Therefore, the same-field-polarity configuration is expected to generate a much higher spin diffusion rate than the opposite-field-polarity one. The opposite-fieldpolarity design is an illustration of the concept of first-order longitudinal spin matching.

### **14.2.2.5 Spin Matching**

*Question 14.1.2.5-1*—The snake lattice in Table 14.33 is close to an identity transformation in the horizontal plane and a −*I* transformation in the vertical plane. Therefore, its insertion into the AGS Booster lattice results in a reasonable periodic solution not requiring any rematch. For simplicity, we ignore the fact that the ring is no longer geometrically closed, since this does not alter the below general conclusions about the spin dynamics. The optics of the entire ring and an expanded view of the snake section are shown in Fig. 14.40 (left) and (right), respectively. *Question 14.1.2.5-2*: The **n**<sup>0</sup> axis at the start of the AGS Booster lattice with the solenoidal snake (Table 14.35) can be found in the following excerpt of zgoubi.res:

```
Spin transfer matrix, momentum group # 1 :
   -0.571992 0.820259 8.558277E-14
    0.820258 0.571991 -1.676874E-03
   -1.375471E-03 -9.591582E-04 -0.999999
Trace = -0.9999993982, ; spin precession acos((trace-1)/2) = 179.9555530060 deg
Precession axis : ( 0.4626, 0.8866, -0.0007) -> angle to (X,Y) plane, angle to X axis : -0.0426, -0.0921 degree
Spin tune Qs (fractional) : 4.9988E-01
```
As expected for a ring with one snake, **n**<sup>0</sup> lies in the horizontal plane and the spin tune is 0.5.

*Question 14.1.2.5-3 and 4*: Figure 14.41 compares the polarization behavior in the AGS Booster lattice with a solenoidal snake for the spin-matched and spinmismatched snake configurations. From the beam dynamics point of view, the two configurations are similar. They only differ by rotation of the snake section by 90◦ about the longitudinal axis. However, in the spin-mismatched case, the spin diffusion rate is several times greater than in the spin-matched situation. This result illustrates the effect of proper optics design on the spin dynamics and the importance of spin matching. Note that spin diffusion is present in the matched case as well. It cannot be avoided in this ring configuration due to **n**<sup>0</sup> being horizontal in the arcs at a

**Fig. 14.40** Left: optics of the AGS Booster ring with the spin-matched snake insertion. Right: expanded view of the optics of the spin-matched snake insertion

**Fig. 14.41** Polarization of 100 electrons as a function of the turn number in the AGS Booster lattice with a solenoidal snake for the spin-matched (red) and spin-mismatched (blue) snake configurations

sufficiently high synchrotron radiation rate. This scenario is used for demonstration purposes only. It shows that spin diffusion due to improper spin matching can dominate over other depolarizing effects.

# **Appendix**

A run of Zgoubi code, in addition to zgoubi.res execution listing, and depending on user's requests, may produce various output files. An example is zgoubi.plt which stores particle coordinates, spin coordinates, electric and magnetic field vectors, etc., step-by-step across optical elements. Another instance is zgoubi.fai which can be used for turn-by-turn particle data storage during multiturn tracking in a circular accelerator. In the present problems, data treatment and graphs can be obtained by reading these files, using gnuplot for instance, or Zgoubi graphic/data treatment interface program Zpop [3]. A brief introduction to these aspects of code and output data handling is given below, and all details can be found in Zgoubi Users' Guide regarding the many storage files at disposal; besides, guidance is provided in due place in the problem assignments (Sect. 14.1) and their solutions (Sect. 14.2).

	- in the matter of graphics it is foreseeable to achieve about any type of graphic, from Zgoubi output files, using gnuplot; if data analysis and other averaging are needed it can be managed via gnuplot scripts (using for instance awk commands, external programs, etc.);

– an additional possibility is to use Zpop, which is part of Zgoubi package. Zpop provides most of the data treatment and graphics means needed to analyze and display the contents of Zgoubi output files.

Besides the run listing zgoubi.res, the main two Zgoubi output files, generally used for data analysis or graphics, are zgoubi.fai (created when introducing the keyword FAISTORE (or FAISCNL, similar), it stores local particle data next to an optical element), and zgoubi.plt recorded if the flag IL=2 is present in optical elements: it logs step-by-step particle and field data, during numerical integration through the element.

Many additional files can be produced (usually by means of a PRINT argument in a keyword, see the Users' Guide), for instance to log data produced by various optical elements and commands, during ray-tracing, in view of data treatment, plotting, debugging, etc. Instances are SPNPRT[PRINT] (spin data logged in zgoubi.SPNPRT.Out), SRLOSS[PRINT] (synchrotron radiation Monte Carlo data logged in zgoubi.SRLOSS.Out).

	- A concise notation KEYWORDS[ARGUMENT1, ARGUMENT2, *...*] may be used in the assignments: it follows the nomenclature of the Users' Guide, Part B. A couple of examples:

OBJET[KOBJ=1] stands for keyword OBJET, and the value of KOBJ=1 retained here;

OPTIONS[CONSTY=ON] stands for keyword OPTIONS, and the option retained here, CONSTY, switched ON.

– The keyword INCLUDE is used at times. The goal is mostly to modularize input data sequences, with usually the benefit of reduced file lengths and improved clarity. In a very similar way to the Latex or Fortran "include" command, a segment of an optical sequence subject to an INCLUDE by a

**Fig. 14.42** Cartesian and cylindrical reference frames in optical elements. Let a particle location M(X,Y,Z) project to m(X,Y) (the dashed curve shows the projected trajectory). In the case of an optical element defined in Cartesian coordinates (shown here as a rectangular box; for instance, the cases of BEND, MULTIPOL), X and Y in zgoubi.plt denote the coordinates taken along the reference frame axes. In the case of an optical element (depicted here as an angular sector AT with some reference radius RM) (for instance, the case of DIPOLE[S]), X is the polar angle, counted positive clockwise, Y is the radius

parent input data file, may always be replaced by that very sequence segment, in the parent file.

	- either Cartesian, in which case X, Y, and Z denote the particle position in that frame, T and P the horizontal and vertical trajectory angles (Figs. 1, 2 in the Users' Guide, and Fig. 14.42 here),
	- or cylindrical, in which case, given *m* the projection of particle position *M* in the Z=0 plane (Fig. 14.42), Y denotes the radial coordinate: *Y* = |**Om**|, whereas *X* denotes the polar angle **OX**-**Om** (as a matter of fact, the nature of the variables named X and Y in the source code does change, and in zgoubi.plt as well) T is the horizontal trajectory angle with respect to the normal to **Om**, P is the vertical trajectory angle.

# **References**


**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.